# method push-exactly

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

# role Iterator

From Iterator

## (Iterator) method push-exactly

Defined as:

method push-exactly(Iterator: , int --> Mu)

Should produce `$count`

elements, and for each of them, call `$target.push($value)`

.

If fewer than `$count`

elements are available from the iterator, it should return the sentinel value `IterationEnd`

. Otherwise it should return `$count`

.

my ;say (1 .. Inf).iterator.push-exactly(, 3); # OUTPUT: «3»say ; # OUTPUT: «[1 2 3]»

The Iterator role implements this method in terms of `pull-one`

.