zipLists
lib.lists.zipLists
Docs pulled from | This Revision | 29 minutes ago
Nixpkgs manual
Merges two lists of the same size together. If the sizes aren't the same the merging stops at the shortest.
Inputs
fst-
First list
snd-
Second list
Type
zipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }]
Examples
lib.lists.zipLists usage example
zipLists [ 1 2 ] [ "a" "b" ]
=> [ { fst = 1; snd = "a"; } { fst = 2; snd = "b"; } ]
Noogle detected
Implementation
The following is the current implementation of this function.
fst: snd:
genList (n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd))