aboutsummaryrefslogtreecommitdiff
path: root/lib/lists.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2013-12-12 14:01:48 -0500
committerShea Levy <shea@shealevy.com>2013-12-12 14:01:48 -0500
commit3c5971692a0edd8867b1c6f91598e0c403bf1376 (patch)
tree4871c37bc3dee7a7f94639509bd91974b491d284 /lib/lists.nix
parenta42508a8ba3f0cba2b62c138f242461e302e96df (diff)
Simplify crossLists
Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'lib/lists.nix')
-rw-r--r--lib/lists.nix7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/lists.nix b/lib/lists.nix
index 561a657264b..71a89702796 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -225,10 +225,5 @@ in rec {
deepSeqList = xs: y: if any (x: deepSeq x false) xs then y else y;
- crossLists = f: xss:
- let
- argss = fold (l: argss:
- concatMap (arg: map (args: [ arg ] ++ args) argss) l
- ) [[]] xss;
- in map (args: foldl (f: arg: f arg) f args) argss;
+ crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f];
}