| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Data.Filtrable
- class Functor f => Filtrable f where
- mapMaybeA :: (Filtrable f, Traversable f, Applicative p) => (a -> p (Maybe b)) -> f a -> p (f b)
- filterA :: (Filtrable f, Traversable f, Applicative p) => (a -> p Bool) -> f a -> p (f a)
Documentation
class Functor f => Filtrable f where Source
Laws:
mapMaybeJust= idmapMaybef =catMaybes∘fmapfcatMaybes=mapMaybeidfilterf =mapMaybe(\ x ->boolNothing(Justx) (f x))mapMaybeg .mapMaybef =mapMaybe(g<=<f)
Laws if :Foldable f
mapMaybeA :: (Filtrable f, Traversable f, Applicative p) => (a -> p (Maybe b)) -> f a -> p (f b) Source
filterA :: (Filtrable f, Traversable f, Applicative p) => (a -> p Bool) -> f a -> p (f a) Source