File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,14 @@ Python
191
191
Perl 6
192
192
$l = -> $i { $i + 12 }
193
193
194
- Another Perl 6 idiom for constructing lambdas is the Whatever code, C < * > .
195
- A C < * > can be used in an expression to indicate that the expression is a
196
- block, and that the C < * > should be replaced by the first parameter to
197
- the block.
194
+ Another Perl 6 idiom for constructing lambdas is the Whatever star, C < * > .
198
195
199
196
Perl 6
200
- $l = * + 12
197
+ $l = * + 12 # same as above
198
+
199
+ A C < * > in an expression will become a placeholder for the argument,
200
+ and transform the expression into a lambda at compile time. Multiple
201
+ C < * > 's in an expression become positional arguments.
201
202
202
203
See the section below for more constructs regarding subroutines and blocks.
203
204
You can’t perform that action at this time.
0 commit comments