Hi...

I'm a Python programmer and I'm trying Ruby now. I love Smalltalk and
Ruby's "OO-ness" and likeness to Smalltalk gives me warm feelings. I'm
really excited about Ruby, enough to consider switching to it from
Python.

However, I was messing around yesterday with Ruby and looked
everywhere for some functionality close to the map() function on
python, but couldn't find it anywhere. For those that don't know the
function, here's a raw example:

a = [1,2,3]
b = [4,5,6]
map(None, a, b) --> [[1,4],[2,5],[3,6]]

The first parameter above can be any function taking 2 parameters and
returning a tuple. A ruby equivalent would be something of the form:

map(a,b) {|i,j| i,j}

I thought about taking the arrays on the argument, generate iterators
for each of them, and then calling the iterators, splicing the result
into a resulting array, but could some *real* Ruby programmer post
some solution here? :-)

Best regards,

Roberto "Wolfox" Amorim
Software Developer - Brazil