Skip to content

Instantly share code, notes, and snippets.

@saghul
Created November 20, 2010 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saghul/707899 to your computer and use it in GitHub Desktop.
Save saghul/707899 to your computer and use it in GitHub Desktop.
lambda example 2
In [1]: def sum(x, y):
...: return x+y
...:
In [2]: f = lambda n: sum(n,1)
In [3]: f(1)
Out[3]: 2
In [4]: f(3)
Out[4]: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment