ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Function: any
Type: (a -> Bool) -> [a] -> Bool
Description: returns True if at least one item in the list fulfills the condition
Related: (&&), all, and, elem, not, notElem, or, (||)
Keywords: boolean, list calculation, or

Example 1

Input: any (1==) [0,1,2,3,4,5]

Output: True

Example 2

Input: any (>5) [0,1,2,3,4,5]

Output: False

Example 3

Input: any even [1,3,5,7,9]

Output: False

Example 4

Input: any (\x -> x*4>20) [1,2,3,4,5,6]

Output: True