filter method

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

Returns a list containing only elements matching the given predicate.

Implementation

Iterable<T> filter(bool Function(T) predicate) => where(predicate);