filter


Description:

public Stream<T> filter (owned PredicateFunc<T> fn)

Returns a Stream containing only elements that match the predicate.

Example:

    var result = stream.filter ((x) => { return x > 0; });

Parameters:

fn

the predicate function.

Returns:

a new filtered Stream.