util-plus-0.1.0.0: A collection of commonly used utils

Safe HaskellSafe
LanguageHaskell2010

Control.Applicative.Plus

Synopsis

Documentation

withOptional :: (Foldable t, Alternative t) => (a -> (b -> m c) -> m c) -> t a -> (t b -> m c) -> m c Source #

optional' :: (MonadPlus t, Alternative f) => f a -> f (t a) Source #

A generalized version of optional that works with Option for example