method skip-at-least-pull-one
Documentation for method skip-at-least-pull-one
assembled from the following types:
role Iterator
From Iterator
(Iterator) method skip-at-least-pull-one
Defined as:
method skip-at-least-pull-one(Iterator:D: $target, int $to-skip --> Mu)
Should skip producing $to-skip
values and if the iterator is still not exhausted, produce and return the next value. Should return IterationEnd
if the iterator got exhausted at any point:
my $i = <a b c>.iterator; say $i.skip-at-least-pull-one(2); say $i.skip-at-least-pull-one(20) =:= IterationEnd; # OUTPUT: «cTrue»
The Iterator role implements this method as calling skip-at-least
and then calling pull-one
if it was not exhausted yet.