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: )
Should produce all elements from the iterator and push them to $target
.
my ;say (1 .. 1000).iterator.push-all(); # All 1000 values are pushed
The Iterator role implements this method in terms of push-at-least
. As in the case of the other push-*
methods, it is mainly intended for developers implementing this role. push-all
is called when assigning an object with this role to an array, for instance, like in this example:
does Iterable does Iterator;my := DNA.new("AAGCCT");my = ;say ; # OUTPUT: «[(A A G) (C C T)]»
The push-all
method implemented pushes to the target iterator in lists of three aminoacid representations; this is called under the covers when we assign $b
to @dna-array
.