where
Filters list elements based on a predicate.
Description
The where
function keeps only elements of a list for which a predicate
evaluates to true
.
xs: list
A list of values.
capture: field
The name of each list element in each predicate.
predicate: bool
The predicate evaluated for each list element.