Skip to content

Commit 08a77b9

Browse files
committed
show the difference between |(1,2,3) and (1,2,3).Slip
1 parent 1b8bdce commit 08a77b9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/Type/Slip.pod6

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ Loops that do not want to produce a value for an iteration use C<Slips>, rather
4545
than empty C<List>s to do so, as do C<if> statements that do not run their
4646
blocks.
4747
48+
Please note that C<prefix:<|>> will also apply parameters in a slippy manner to
49+
a routine call. It does not forward a C<Slip> to the called routine, that
50+
includes C<return> and C<take>.
51+
52+
my \l = gather for 1..10 -> $a, $b { take |($a, $b) }; say l.perl;
53+
# OUTPUT«((1, 2), (3, 4), (5, 6), (7, 8), (9, 10)).Seq␤»
54+
my \l = gather for 1..10 -> $a, $b { take ($a, $b).Slip }; say l.perl;
55+
# OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).Seq␤»
56+
4857
=head1 Methods
4958
5059
=head2 sub slip

0 commit comments

Comments
 (0)