summaryrefslogtreecommitdiffstats
path: root/lib/lists.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-23 19:25:58 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-24 15:58:34 +0200
commit447afef153bf6ebcf385028845c1e8947d61aaac (patch)
tree034fb7aa6115160e2f71de6810e368841fd5e98f /lib/lists.nix
parenta2f16fdcffae5a2b2bf8b712118e730a7362b8b2 (diff)
Use builtin all and any functions
Diffstat (limited to 'lib/lists.nix')
-rw-r--r--lib/lists.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lists.nix b/lib/lists.nix
index 9cb164aaade4..fde6f5d42fcb 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -90,12 +90,12 @@ rec {
# Return true iff function `pred' returns true for at least element
# of `list'.
- any = pred: fold (x: y: if pred x then true else y) false;
+ any = builtins.any or (pred: fold (x: y: if pred x then true else y) false);
# Return true iff function `pred' returns true for all elements of
# `list'.
- all = pred: fold (x: y: if pred x then y else false) true;
+ all = builtins.all or (pred: fold (x: y: if pred x then y else false) true);
# Count how many times function `pred' returns true for the elements