query
On this page

any

builtins.any

Primop
Docs pulled from | This Revision | 34 minutes ago

Takes 2 arguments

pred, list


Return true if function pred returns true for at least one element of list.

Inputs

pred

Predicate

list

Input list

Type

any :: (a -> bool) -> [a] -> bool

Examples

lib.lists.any usage example

any isString [ 1 "a" { } ]
=> true
any isString [ 1 { } ]
=> 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.
(lib.lists.any)

Noogle detected

Aliases

Implementation

This function is implemented in c++ and is part of the native nix runtime.