[Haskell-cafe] [announcement] filtrable: class of filtrable containers

M Farkas-Dyck m.farkasdyck at gmail.com
Wed Feb 17 07:02:29 UTC 2016


I quietly posted this library to Hackage nearly a year ago, but lately
learned that some seeking such a package had difficulty finding it, so
i announce it now ☺

https://hackage.haskell.org/package/filtrable

class Functor f => Filtrable f where
    mapMaybe :: (a -> Maybe b) -> f a -> f b
    catMaybes :: f (Maybe a) -> f a
    filter :: (a -> Bool) -> f a -> f a

For laws, see docs on Hackage.


More information about the Haskell-Cafe mailing list