mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
It seems that lib.zip is already taken from attributesets, therefore renaming it to zipTwoLists
svn path=/nixpkgs/trunk/; revision=22887
This commit is contained in:
parent
d17f0f9cbc
commit
1e9dc2b254
@ -178,9 +178,9 @@ rec {
|
||||
loop list;
|
||||
|
||||
# Zip two lists together.
|
||||
zip = xs: ys:
|
||||
zipTwoLists = xs: ys:
|
||||
if xs != [] && ys != [] then
|
||||
[ {first = head xs; second = head ys;} ]
|
||||
++ zip (tail xs) (tail ys)
|
||||
++ zipTwoLists (tail xs) (tail ys)
|
||||
else [];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user