import { heads } from "https://deno.land/x/itertools@v1.1.1/mod.ts";
Yields the heads of all of the given iterables. This is almost like
roundrobin()
, except that the yielded outputs are grouped in to the
"rounds":
>>> [...heads([1, 2, 3], [4], [5, 6, 7, 8])]
[[1, 4, 5], [2, 6], [3, 7], [8]]
This is also different from zipLongest()
, since the number of items in
each round can decrease over time, rather than being filled with a filler.
Parameters
...iters: Array<Iterable<T>>