findall

.findall from:{Iterable<Any>} condition:{Lambda} -> Iterable<Any>

Finds all the elements of a collection that satisfy a condition.

.var {numbers}
- 3
- 8
- 12

.numbers::findall {n: .n::isgreater than:{5}} <!-- 8, 12 -->

Return

a new collection containing the elements that satisfy condition, in their original order. If no element does, the collection is empty

Parameters

from

collection to search in

condition

condition to check, which accepts one argument (the current element) and returns a boolean

Chaining

This function is designed to be chained with other function calls:
Iterable<Any>::findall condition:{Lambda} -> Iterable<Any>