Last active
December 24, 2015 12:29
-
-
Save funrep/6798087 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
-- Attempt to implement monads | |
return' v = \_ -> v | |
lift a = a () | |
bind a f = f $ lift a | |
inc n = n + 1 | |
mInc a = bind a (\v -> return' $ inc v) |
Author
funrep
commented
Oct 2, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment