Created
August 23, 2018 06:42
-
-
Save paulp/29c8b46f445552e1b5183a8a7693d16c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance Monad f => Monad (OptionalT f) where | |
f =<< x = OptionalT $ runOptionalT x >>= \case | |
Empty -> return Empty | |
Full a -> runOptionalT $ f a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment