Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

lambda python

>>> def make_incrementor(n):
...     return lambda x: x + n
...
>>> f = make_incrementor(42)
>>> f(0)
42
>>> f(1)
43
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #lambda #python
ADD COMMENT
Topic
Name
2+2 =