I just discovered the Swift zip
function recently. It seems quite useful.
It takes 2 input arrays and creates an array of tuples out of pairs of values from each array.
Is there a variant of zip that takes an arbitrary number of arrays and outputs tuples with that same number of elements? It seems like there should be a way to do this.