From 447afef153bf6ebcf385028845c1e8947d61aaac Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 23 Jul 2015 19:25:58 +0200 Subject: [PATCH] Use builtin all and any functions --- lib/lists.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/lists.nix b/lib/lists.nix index 9cb164aaade..fde6f5d42fc 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