2 ms·
collection.each(lambda x: ... ... ) Or if the language doesn't require () to call a method, and uses `do` instead of `lambda`: collection.
by jules 17y ago
collection.each(lambda x:
...
...
)
Or if the language doesn't require () to call a method, and uses `do` instead of `lambda`:
collection.each do x:
...
...
If it's not the first argument:
map(lambda x:
...
...
, collection)
Yes this is ugly, but using a multi line anonymous function in the middle of an argument list will always be ugly.