From: David Richards Date: 2013-01-22T09:09:55+09:00 Subject: Re: Enumerator usage Robert Klemme wrote in post #1093088: > Ruby is not a functional language so methods are not first class objects. I've just learned that methods can be first class objects: add_two = 2.method(:+) add_two.class # => Method (1..3).map(&add_two) # => [3,4,5] Using this idiom, methods become first class objects. It appears that Ruby may well facilitate many (if not all) of the functional idioms I'm fond of using. There may be some performance penalties associated with some of these idioms however. So this whole topic area seems much more robust and arcane than is apparently commonly understood. It's not as simple as "Ruby is not a functional language" and "methods are not first class objects". It's obviously a bigger matter of understanding the Ruby class hierarchy and full syntax. I've only been studying Ruby for three days and I'm still obviously struggling with the basics. But at least now I see that Ruby has some 'hidden' potential. _ Dave -- Posted via http://www.ruby-forum.com/.