Effectful Kleisli composition function for MonadE
Add a function to the Prelude that allows Kleisli composition of effectful functions for the MonadE
type class.
compE :: MonadE m => (a -> <e> m b) -> (b -> <f> m c) -> a -> <e,f> m c
compE f g x = (f x) `bindE` g
This can be used for easily composing functions that return lists or Maybe
values:
values = mapMaybe (flip possibleObject DN.MappedFromElement `compE` flip possibleRelatedValue DN.Edge.HasLength) (children object)