Created
June 29, 2015 04:57
-
-
Save vinipsmaker/d603d9fd8b5112827cac 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
// LEMBRETE: monad é um padrão, e sua implementação não precisa ser exatamente assim: | |
function bind(monad, f) { | |
return f(monad.value); | |
} | |
// bind também podia ser uma função-membro, possibilitando algo do tipo: | |
monad.bind(f_1).bind(f_2).bind(f_3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment