Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

map, lambda confusion

What am I doing wrong here? The map creates an iterator OK, but when I try to list it I get a type error.

list(map(lambda x,y : x + y,[(1,2),(3,4),(5,6)]))

TypeError                                 Traceback (most recent call last)
<ipython-input-11-031490d94268> in <module>()
----> 1 list(map(lambda x,y : x + y,[(Integer(1),Integer(2)),(Integer(3),Integer(4)),(Integer(5),Integer(6))]))

TypeError: <lambda>() missing 1 required positional argument: 'y'