Consumes atMost elements from iterable and returns the consumed elements, and an iterable for the rest of the elements.
atMost
consume([1, 2, 3, 4]); //=> [[1, 2, 3, 4], Iterable<[]>] consume([1, 2, 3, 4], 2); //=> [[1, 2], Iterable<[3, 4]>]
The iterable target to consume
The count at most to consume
Generated using TypeDoc
Consumes
atMost
elements from iterable and returns the consumed elements, and an iterable for the rest of the elements.