Simplify crossLists
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
a42508a8ba
commit
3c5971692a
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user