From: Robert Dober Date: 2011-06-29T17:17:17+09:00 Subject: Re: Symbol#=== On Tue, Jun 28, 2011 at 6:44 PM, Josh Cheek wrote: > On Tue, Jun 28, 2011 at 10:04 AM, Robert Dober wrote: Duly noted ;) I do not change my POV but I will not evangelize of course. > I think your example of map(:+, 42) would be better achieved with more > functional support. Something along these lines: > def f(meth, *args) >  Proc.new do |obj| >    obj.send meth, *args >  end > end > nums = [10, 20, 30] > nums.map(&(f :+, 5)) # => [15, 25, 35] > nums.map(&(f :-, 5)) # => [5, 15, 25] > Using, what I believe is, a functor is indeed a nice idea. N.B. I have nothing against #to_proc in general. Cheers R. -- I'm not against types, but I don't know of any type systems that aren't a complete pain, so I still like dynamic typing. -- Alain Kay