Adds function Filter() to extract elements that satisfy a predicate.

Could you add a test for the case where all elements get filtered?