method push-all

Documentation for method push-all, assembled from the following types:

role Iterator

From Iterator

(Iterator) method push-all

Defined as:

method push-all(Iterator:D: $target)

Produces all elements from the iterator and pushes them to $target.

The fallback is implemented in terms of repeated push-at-least with a large $count.

my @array;
say (1 .. 1000).iterator.push-all(@array); # All 1000 values are pushed