From: Christian Neukirchen Date: 2005-03-20T23:22:59+09:00 Subject: Re: Paul Graham recommends Ruby Florian Gross writes: > Christian Neukirchen wrote: > >> (What happened to the S.find_all &:P idea, btw?) > > We can do that: > > class Symbol > def to_proc() > lambda { |other, *args| other.send(self, *args) } > end > end > > irb(main):001:0> [1, 2, 3, 4].inject(&:+) > => 10 > irb(main):002:0> %w(foo bar qux).map(&:reverse) > => ["oof", "rab", "xuq"] Oy, thanks. Why didn't I figure that on my own. :-) -- Christian Neukirchen http://chneukirchen.org