Version: v0.8.1 - Beta.  We welcome contributors & feedback.

List.all

all($callbackFunction) -> boolean

Description

Apply $callbackFunction to every item in the list.

Return true only if all items result in true.

$nums = [10, 15, 20]

$nums.all(fun ($n) { return $n >= 10 })
//= true

// or using expression notation
$nums.all(x{ $a >= 10 })
//= true

See Also