any multimethod

Methods

any(e:Eachable1, predicate:Any) Source: stdlib.ngs:1546
Check whether there is any element in e that satisfies the given predicate.

Parameters

eThe items to check
predicateTest function

Returns

Bool

Example

[1,2,10].any(F(elt) elt > 5)   # true
[1,2,10].any(F(elt) elt > 15)  # false
any(b:Box, predicate:Any) Source: stdlib.ngs:2750
Test Box value

Example

Box(5).any(Int)      # true
Box(5).any(Str)      # false
EmptyBox().any(Int)  # false