The function zip :: [a] -> [b] -> [(a,b)] pairs corresponding list positions, stopping when either input ends. Pairing a finite list with [0..] attaches its zero-based indices without constructing an infinite result. With the unbounded Integer index type this avoids index overflow for arbitrarily long finite inputs.

Articles by others on the same topic (0)

There are currently no matching articles.