Skip to content

Instantly share code, notes, and snippets.

@kzar
Created August 18, 2015 13:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kzar/ea70da930d3b1ddb525f to your computer and use it in GitHub Desktop.
Save kzar/ea70da930d3b1ddb525f to your computer and use it in GitHub Desktop.
Very simple example of how you could curry functions in Python using lambda
def example(a, b, c):
return (a, b, c)
curried1 = lambda b, c: example(1, b, c)
curried2 = lambda *args: example(1, *args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment