You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/Language/py-nutshell.pod6
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,8 +171,7 @@ Perl 6
171
171
say x;
172
172
# x is 10
173
173
174
-
Lambdas in Python are equivalent to anonymous subroutines in Perl 6.
175
-
One way to write them is as pointy blocks.
174
+
Lambdas in Python can be written as blocks or pointy blocks in Perl 6.
176
175
177
176
Python
178
177
l = lambda i: i + 12
@@ -187,7 +186,7 @@ the block.
187
186
Perl 6
188
187
$l = * + 12
189
188
190
-
See the section below for more constructs.
189
+
See the section below for more constructs regarding subroutines and blocks.
191
190
192
191
Another example (from the Python L<FAQ|https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result>):
0 commit comments