Skip to content

Commit d70beee

Browse files
committed
whatever
1 parent 441c3e6 commit d70beee

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/Language/py-nutshell.pod6

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,14 @@ Python
191191
Perl 6
192192
$l = -> $i { $i + 12 }
193193
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<*>.
198195
199196
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.
201202
202203
See the section below for more constructs regarding subroutines and blocks.
203204

0 commit comments

Comments
 (0)