From: Mike Gold Date: 2009-03-06T06:29:10+09:00 Subject: Re: Any solutions to Ruby's inconsistencies? Todd Benson wrote: > On Thu, Mar 5, 2009 at 10:52 AM, C. Dagnon > wrote: >> Interesting... I hadn't learned about the *ect's. I have used collect >> (never map, yuck), > > Hmm, let me think about that method name... you are "mapping" a set of > things into another set (I'm using "set" for a simple group of > things); "collect" makes much less sense to me. What exactly are you > collecting? Probably just vernacular used in CS circles that I'm not > aware of, but silly nonetheless. I suspect it is from Common Lisp's loop: (loop for i from 1 to 3 collect (* i i)) ==> (1 4 9) You can do a bazillion different things inside a CL loop; collecting results is just one of them. The loop terminology doesn't really fit here. I prefer 'map' since that is the name for the operation in other languages (including Lisp). -- Posted via http://www.ruby-forum.com/.