List::filter
Return a copy of this list with the items where f(item)
returns
True.
Source Codepublic method filter<T>(this: List<T>, f: Fun<(T), Bool>): List<T> {
let result: List<T> = []
for item in this {
if f(item) {
result = result.append(item)
}
}
result
}