Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > (||) <$> (putStrLn "x" >> pure True) <*> (putStrLn "y" >> pure False)
- x
- y
- True
- > let mor = \ma mb -> ma >>= \a -> if a then pure True else mb
- > :t mor
- mor :: Monad m => m Bool -> m Bool -> m Bool
- > mor (putStrLn "x" >> pure True) (putStrLn "y" >> pure False)
- x
- True
Add Comment
Please, Sign In to add comment