Range.filter
filterfilter
Group: Selections
Documentation
Returns a vector of all elements of this range which satisfy a condition.
Arguments
filter
: The filter to apply to the range. It can either be an instance ofFilter_Condition
or a predicate taking a value and returning a boolean value indicating whether the corresponding element should be kept or not.
Examples
Selecting all elements that are greater than 3.
(0.up_to 7).filter (> 3)
(0.up_to 7).filter (..Greater than=3)