2 ms·
Ruby defines 'map', 'each', and other iteration utilities as higher order functions. This means that, while it works for tuples, this does not for looping. The
by ori_b 14y ago
Ruby defines 'map', 'each', and other iteration utilities as higher order functions. This means that, while it works for tuples, this does not for looping.
The equivalent code in Python would be this:
def each_fn(unused, unused, email):
pass
map(iter_fn, list)
And this does in fact give a syntax error:
SyntaxError: duplicate argument 'unused' in function definition