all
builtins.all
Primop
Docs pulled from | This Revision | 16 minutes ago
Takes 2 arguments
pred, list
Return true if function pred
returns true for all elements of
list
.
Inputs
pred
-
Predicate
list
-
Input list
Type
all :: (a -> bool) -> [a] -> bool
Examples
lib.lists.all
usage example
all (x: x < 3) [ 1 2 ]
=> true
all (x: x < 3) [ 1 2 3 ]
=> false
This function is not defined in a .nix file. It is likely a builtins function or an alias of a builtins function. builtins functions are predefined functions provided by Nix.