def filter(p: (A) ⇒ Boolean): Seq[A]
Selects all elements of this traversable collection which satisfy a predicate.
p
the predicate used to test elements.
returns
a new traversable collection consisting of all elements of this traversable collection that satisfy the given predicate p. The order of the elements is preserved.