Subject: Re: Ruby equivalent to Python's map()?
From: Vincent Foley <vinfoley iquebec.com>
Date: Fri, 15 Nov 2002 10:01:40 +0900
References: 5584255847
[1,2,3,4].map { |x| x*2 }
-> [2, 4, 6, 8]
That's probably what you want. Enumerable#map is a synonym for collect
by the way.
VInce
--
Vincent Foley-Bourgon
Email: vinfoley / iquebec.com
Homepage: http://darkhost.mine.nu:81