Skip to content

@all

Return true if every element satisfies the predicate.

Returns: bool

@all(arr fn)
Name Type Description
arr array Source array
fn helper Predicate helper returning bool
# Check all positive
def @isPositive "$n: number -> bool" @bool($n > 0)
print @all([1 2 3] @isPositive)
  • @any — true if at least one matches
  • @filter — keep matching elements