def
func:all
all(val, fn)
Return if all the items in a list, dict, or grid match the given test function. If the collection is empty, then return true.
If working with a list, the function takes (val)
or (val, index)
and returns true or false.
If working with a dict, the function takes (val)
or (val, name)
and returns true or false.
If working with a grid, the function takes (row)
or (row, index)
and returns true or false.
If working with a string, the function takes (char)
or (char, index)
and returns true or false.
If working with a stream, then function takes (val)
and returns true or false. See Streams.
Examples:
[1, 3, 5].all v => v.isOdd >> true [1, 3, 6].all(isOdd) >> false