zip method

Queue<Queue<E>> zip()

Pairs corresponding elements together.

['one', 'two', 'three', 1, 2, 3].zip() returns ['one', 1, 'two', 2, 'three', 3].

Sub-iterables must have same type of elements, or be the same type of iterable (List, Set, etc.).

Implementation

Queue<Queue<E>> zip() {
  return h.zipIterable(this).toNestedQueue();
}