bytestring Data.ByteString.Short Data.ByteString.Short.Internal, filepath System.OsPath.Data.ByteString.Short

Filter all values that satisfy some 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

Filter all elements that satisfy some predicate.

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

The filter function takes a predicate `p`
and a sequence `xs` and returns a sequence of those elements
which satisfy the predicate.

Filter all elements that satisfy the predicate.

Drop elements which do not satisfy the predicate

Drop elements which do not satisfy the predicate

unordered-containers Data.HashMap.Internal Data.HashMap.Internal.Strict Data.HashMap.Lazy Data.HashMap.Strict

Filter this map by retaining only elements which values
satisfy a predicate.

Filter this set by retaining only elements satisfying a
predicate.

Keep only values in the stream passing a given predicate.
Subject to fusion

Keep only values in the stream passing a given predicate.
Subject to fusion
Since 0.3.0

filter, applied to a predicate and a list,
returns the list of those elements that satisfy the predicate; i.e.,

filter p xs = [ x | x <- xs, p x]

>>> filter odd [1, 2, 3] [1,3]

Generates a value that satisfies a predicate.
This is essentially:

filter p gen =It differs from the above in that we keep some state to avoid looping forever. If we trigger these limits then the whole generator is discarded.mfilterp gen <|> filter p gen

Returns a tree containing only elements that match the predicate.
If the root of the tree does not match the predicate then
Nothing is returned.