Creates a task retaining only the items matching a predicate.
Items are emitted in source order.
The type of items in the feed
The function testing each item
A task yielding the items matching predicate
predicate
await pipe( (items([1, 2, 3, 4, 5])) (filter(n => n%2 === 0)) (toArray())); // [2, 4] Copy
await pipe( (items([1, 2, 3, 4, 5])) (filter(n => n%2 === 0)) (toArray())); // [2, 4]
Creates a task retaining only the items matching a predicate.
Items are emitted in source order.