Skip to content

Commit

Permalink
Added docs for Supply.skip. ugexe++
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Olof Hendig committed Jun 10, 2017
1 parent 9f60666 commit fe2398a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/Type/Supply.pod6
Expand Up @@ -555,6 +555,20 @@ Creates a supply that emits a Range every time a new minimum or maximum
values is seen from the given supply. The optional parameter specifies
the comparator, just as with Any.max.
=head2 method skip
method skip(Supply:D: Int(Cool) $number = 1 --> Supply:D)
Returns a new C<Supply> which will emit all values from the given C<Supply>
except for the first C<$number> values, which will be thrown away.
=for code
my $supplier = Supplier.new;
my $supply = $supplier.Supply;
$supply = $supply.skip(3);
$supply.tap({ say $_ });
$supplier.emit($_) for 1..10; # OUTPUT: «4␤5␤6␤7␤8␤9␤10␤»
=head2 method start
method start(Supply:D: &startee --> Supply:D)
Expand Down

0 comments on commit fe2398a

Please sign in to comment.