All#
The e.all(x, p) macro tests whether predicate p is true for every element x in collection e.
Lists#
Returns true if the predicate is true for all elements.
An empty list returns true.
Maps#
When applied to a map, all iterates over the keys.
// input: scores = {"alice": 95, "bob": 87}
scores.all(name, scores[name] >= 80)
// result: true (bool)
An empty map returns true.
Short-circuit evaluation#
Evaluation stops at the first false result.
The first element produces false so evaluation stops before erroring with a divide-by-zero error.