Created
July 21, 2019 00:09
-
-
Save calebh/a7ef1f4708312989d3d2db7f11937c34 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
typeclass Monad<m> { | |
m<b> >>= <a, b>(m<a>, Func<a, m<b>>); | |
m<b> >> <a, b>(m<a> x, m<b> y) { | |
return >>= <a, b>(x, (ignored) => y); | |
} | |
m<a> return_ <a>(a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment