@all
Return true if every element satisfies the predicate.
Returns: bool
Syntax
Section titled “Syntax”@all(arr fn)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
arr |
array |
Source array |
fn |
helper |
Predicate helper returning bool |
Examples
Section titled “Examples”# Check all positivedef @isPositive "$n: number -> bool" @bool($n > 0)print @all([1 2 3] @isPositive)