mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Add foldl' primop
This commit is contained in:
parent
887bb5fa5a
commit
61af14a921
3 changed files with 38 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue