Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb54be8 commit c113465Copy full SHA for c113465
1 file changed
Doc/tut/tut.tex
@@ -1497,8 +1497,15 @@ \subsection{Lambda Forms \label{lambda}}
1497
overcome through the judicious use of default argument values, e.g.
1498
1499
\begin{verbatim}
1500
-def make_incrementor(n):
1501
- return lambda x, incr=n: x+incr
+>>> def make_incrementor(n):
+... return lambda x, incr=n: x+incr
1502
+...
1503
+>>> f = make_incrementor(42)
1504
+>>> f(0)
1505
+42
1506
+>>> f(1)
1507
+43
1508
+>>>
1509
\end{verbatim}
1510
1511
0 commit comments