Documentation for method batch

Documentation for method batch, assembled from the following types:

class Supply

From Supply

(Supply) method batch

method batch(Supply:D: :$elems:$seconds --> Supply:D)

Creates a new supply that batches the values of the given supply by either the number of elements in the batch (using :elems) or the maximum number of seconds (using the :seconds) or both. Any remaining values are emitted in a final batch when the supply is done.