From: Joel VanderWerf Date: 2005-10-27T15:25:12+09:00 Subject: Re: Cleaner syntax for .map (is there already a way, or ruby2 idea?) Ron M wrote: > > I find that a bunch of my code looks like > > people.map{|person| person.email_addr} > > where I use map to apply a single method to elements inside arrays. > > That sure beats C, but wouldn't it be nice if there > were a shorthand for doing so. I think something > like this would be very nice: > > people[*].email_addr google for "symbol to_proc". For example: http://extensions.rubyforge.org/rdoc/classes/Symbol.html -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407