Created
August 23, 2018 06:42
-
-
Save paulp/244846ffa026ac7bfed3bf57ea0398db to your computer and use it in GitHub Desktop.
This file contains hidden or 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