filter abstract method

IntStream filter(
  1. bool predicate(
    1. int
    )
)

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

Example

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

Implementation

IntStream filter(bool Function(int) predicate);