Skip to content

Instantly share code, notes, and snippets.

@Prodge
Created February 17, 2017 01:56
Show Gist options
  • Save Prodge/f6588725621d3bda5223df98d08c240e to your computer and use it in GitHub Desktop.
Save Prodge/f6588725621d3bda5223df98d08c240e to your computer and use it in GitHub Desktop.
Map implementation using reduce in Python
def my_map(fn, coll):
reduce(lambda out, x: out + [fn(x)], coll, [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment