Skip to content

Instantly share code, notes, and snippets.

@alexmic
Created March 2, 2012 00:30
Show Gist options
  • Save alexmic/1954273 to your computer and use it in GitHub Desktop.
Save alexmic/1954273 to your computer and use it in GitHub Desktop.
Using mtmap()
def worker(n):
return n**2
squared = mtmap(worker, [2, 3, 4, 5])
#= [4, 9, 16, 25]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment