From: Ross Bamford Date: 2006-01-04T06:22:58+09:00 Subject: Re: Implicit block parameter? On Tue, 03 Jan 2006 20:55:02 -0000, Andrew McGuinness wrote: > gabriele renzi wrote: > > > > True, but considering how often people write > > each {|x| stuff(x)} > > I don't think it would be a great less in readability. > > Not really advocating "it", but neither against it. No pun intended. > > Another way of dealing with it would be if it were easier to get from a > method to a Proc object, so instead of, say > > heads = queues.map { |x| x.first } > > You could have something more like: > > heads = queues.map( &:first ) > Hmm, check out http://extensions.rubyforge.org/rdoc/classes/Symbol.html . I'd not thought about it until now but it's actually a pretty good way to cut that verbosity in the simple cases..: require 'extensions/symbol' ['one','two','three'].map &:upcase # => ['ONE','TWO','THREE'] Nice one :) -- Ross Bamford - rosco@roscopeco.remove.co.uk