Pair up the entries of two tuples.
Zip takes two tuple types and returns a new tuple where each element is a pair containing the values from the same index in both tuples.
Zip
The resulting tuple length is determined by the shorter input tuple.
The first tuple.
The second tuple.
A tuple of paired elements.
type Result = Zip<[1, 2, 3], ['a', 'b', 'c']>;// [[1,'a'], [2,'b'], [3,'c']] Copy
type Result = Zip<[1, 2, 3], ['a', 'b', 'c']>;// [[1,'a'], [2,'b'], [3,'c']]
type Result = Zip<[1, 2], ['a', 'b', 'c']>;// [[1,'a'], [2,'b']] Copy
type Result = Zip<[1, 2], ['a', 'b', 'c']>;// [[1,'a'], [2,'b']]
type Result = Zip<[], [1, 2, 3]>;// [] Copy
type Result = Zip<[], [1, 2, 3]>;// []
Pair up the entries of two tuples.
Ziptakes two tuple types and returns a new tuple where each element is a pair containing the values from the same index in both tuples.The resulting tuple length is determined by the shorter input tuple.