query
On this page

any

lib.any

Primop
Docs pulled from | This Revision | 43 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
(lib.lists.any)

Noogle detected

Aliases

Implementation

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