filter abstract method

GenericStream<T> filter(
  1. bool predicate(
    1. T
    )
)

Returns a stream consisting of the elements of this stream that match the given predicate.

Example

final evens = GenericStream.range(1, 10)
    .filter((n) => n % 2 == 0);

Implementation

GenericStream<T> filter(bool Function(T) predicate);