Last active
June 10, 2017 17:15
-
-
Save dogbert17/18e2818e5256147d38462f823397a70c to your computer and use it in GitHub Desktop.
Attempt to doc Supply.skip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=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: «45678910» |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment