all
lib.all
Primop
Docs pulled from | This Revision | 4 days ago
Takes 2 arguments
pred, list
Returns 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
Noogle detected
Implementation
This function is implemented in c++ and is part of the native nix runtime.