From 3c5971692a0edd8867b1c6f91598e0c403bf1376 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Thu, 12 Dec 2013 14:01:48 -0500 Subject: [PATCH] Simplify crossLists Signed-off-by: Shea Levy --- lib/lists.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/lists.nix b/lib/lists.nix index 561a657264bb..71a897027962 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]; }