Returns a Stream that yields elements from the source that satisfy the predicate.
Type of items in the source.
Predicate to filter elements.
Operation that yields elements from the source that satisfy the predicate.
const result = filter((x) => x % 2 === 0)([1, 2, 3, 4, 5]);console.log([...result]); // [2, 4] Copy
const result = filter((x) => x % 2 === 0)([1, 2, 3, 4, 5]);console.log([...result]); // [2, 4]
Returns a Stream that yields elements from the source that satisfy the predicate.