Returns an OperationFunction that yields elements from the source that satisfy the predicate.
Type of items in the source.
Predicate to filter elements.
An OperationFunction 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 an OperationFunction that yields elements from the source that satisfy the predicate.