catmaybes -package:yesod-paginator -package:vector-stream package:streamly-core

Modify a fold to receive a Maybe input, the Just values are unwrapped and sent to the original fold, Nothing values are discarded.
>>> catMaybes = Fold.mapMaybe id

>>> catMaybes = Fold.filter isJust . Fold.lmap fromJust
In a stream of Maybes, discard Nothings and unwrap Justs.
>>> catMaybes = Stream.mapMaybe id

>>> catMaybes = fmap fromJust . Stream.filter isJust
Pre-release