module Hydra.Lib.Optionals where

import qualified Data.Maybe as Y


apply :: Y.Maybe (a -> b) -> Y.Maybe a -> Y.Maybe b
apply :: forall a b. Maybe (a -> b) -> Maybe a -> Maybe b
apply = forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
(<*>)

bind :: Y.Maybe a -> (a -> Y.Maybe b) -> Y.Maybe b
bind :: forall a b. Maybe a -> (a -> Maybe b) -> Maybe b
bind = forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(>>=)

map :: (a -> b) -> Y.Maybe a -> Y.Maybe b
map :: forall a b. (a -> b) -> Maybe a -> Maybe b
map = forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap

pure :: a -> Y.Maybe a
pure :: forall a. a -> Maybe a
pure = forall a. a -> Maybe a
Just