Skip to content

Commit 5e1a7a5

Browse files
committed
sink method documented in Seqs. Closes #2028
1 parent 92d045b commit 5e1a7a5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

doc/Type/Seq.pod6

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,21 @@ C<repeat { body } while cond> loops.
118118
The third form enables C-style looping by calling a third callback,
119119
C<&afterward>, after each call to C<&body>.
120120
121+
=head2 method sink
122+
123+
Defined as:
124+
125+
method sink(--> Nil)
126+
127+
Calls L<C<sink-all>|/routine/sink-all> if it is an C<Iterator>, C<sink> if the Sequence is a list.
128+
129+
say (1 ... 1000).sink; # OUTPUT: «Nil␤»
130+
131+
This is something you might want to do for the side effects of producing those values.
132+
121133
=head2 method skip
122134
123-
Defined As:
135+
Defined as:
124136
125137
multi method skip(Int() $n = 1 --> Seq)
126138

0 commit comments

Comments
 (0)