1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

Add foldl' primop

This commit is contained in:
Eelco Dolstra 2015-07-23 17:03:02 +02:00
parent 887bb5fa5a
commit 61af14a921
3 changed files with 38 additions and 1 deletions

View file

@ -17,7 +17,7 @@ rec {
then fold (x: y: (flatten x) ++ y) [] x
else [x];
sum = fold (x: y: add x y) 0;
sum = foldl' (x: y: add x y) 0;
hasSuffix = ext: fileName:
let lenFileName = stringLength fileName;