Last active
December 31, 2015 06:19
-
-
Save Rembane/7946384 to your computer and use it in GitHub Desktop.
So, what happens when we wrap something in a monad? :D And what can we do with these endless possibilities?
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
{-# LANGUAGE NoMonomorphismRestriction #-} | |
-- If we aren't careful, the monomorphism restriction will bite our backs. | |
module Magic where | |
magic :: (Monad m) => Int -> Int -> m Int | |
magic a b = return $ a + b | |
main = magic 7 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment