The filter method takes a predicate, and if a value from the upstream doesn't meet a condition of the predicate, it isn't passed to the downstream.
A predicate is a function that takes parameters and returns a Boolean value.
The following diagram shows how the filter method works in the previous example:
In this example, the filter operator is only used to receive odd numbers.