From: Aleksei Guzev Date: 2002-11-14T23:19:49+09:00 Subject: Re: Ruby equivalent to Python's map()? What class this "map function" should be method of? I'm not sure this is the most elegant way... a = [1,2,3] b = [4,5,6] c = [] # the result a.each_with_index{|e,i| c << [e,b[i]] } 'Enumerable#collect' is the closest method to Python's function 'map'. There is synonim 'Enumerable#map' ;) c = b.collect{|e| -e}