Mauricio FernáÏdez wrote: > On Sat, Sep 27, 2003 at 02:19:15AM +0900, Hal Fulton wrote: > >>I like the "mapf" idea someone had (map function). Example: >>Instead of >> array.map {|x| x.capitalize } >>we could do >> array.mapf(:capitalize) >> > > Florian Gross found one way to do > > array.map(&:capitalize) > > (defining Symbol#to_proc), if you can stand the line noise. I'd probably prefer mapf. But this solution is elegant and interesting. I didn't even realize there was a to_proc. Hal