:: Map k v -> (v -> Bool) -> Map k v

Filter all values that satisfy the predicate.
filter (> "a") (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
filter (> "x") (fromList [(5,"a"), (3,"b")]) == empty
filter (< "a") (fromList [(5,"a"), (3,"b")]) == empty
O(n). Filter all values that satisfy the predicate.
filter (> "a") (fromList [(5,"a"), (3,"b")]) == singleton 3 "b"
filter (> "x") (fromList [(5,"a"), (3,"b")]) == empty
filter (< "a") (fromList [(5,"a"), (3,"b")]) == empty
Strip all leading and trailing occurrences of an element passing a predicate and make all other consecutive occurrences uniq.
prune p = dropWhileAround p $ uniqBy (x y -> p x && p y)
> Stream.prune isSpace (Stream.fromList "  hello      world!   ")
"hello world!"
Space: O(1) Unimplemented
Take all consecutive elements at the end of the stream for which the predicate is true. O(n) space, where n is the number elements taken. Unimplemented
Like takeWhile and takeWhileLast combined. O(n) space, where n is the number elements taken from the end. Unimplemented
Drop all consecutive elements at the end of the stream for which the predicate is true. O(n) space, where n is the number elements dropped. Unimplemented
Like dropWhile and dropWhileLast combined. O(n) space, where n is the number elements dropped from the end. Unimplemented
Filter based on edge label property.
Keep all values that satisfy the given predicate
>>> filter even (fromList [("C",3),("B",2),("A",1)])
fromList [("B",2)]

>>> filter odd (fromList [("C",3),("B",2),("A",1)])
fromList [("C",3),("A",1)]
Filter all values that satisfy some predicate.