skip-at-least
ErrorsCollection

skip-at-least

Synthesised documentation from type/Iterator

From type/Iterator

See Original text in context

method skip-at-least(Iterator:D: $targetint $to-skip --> Mu)

Should skip producing $to-skip values. The return value should be truthy if the skip was successful and falsy if there were not enough values to be skipped:

my $i = <a b c>.iterator;
say $i.skip-at-least(2); say $i.pull-onesay $i.skip-at-least(20);
# OUTPUT: «1␤c␤0␤»

The Iterator role implements this method as a loop calling skip-one and returning whether it returned a truthy value sufficient number of times.