Skip to content

Instantly share code, notes, and snippets.

@vinipsmaker
Created June 29, 2015 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinipsmaker/d603d9fd8b5112827cac to your computer and use it in GitHub Desktop.
Save vinipsmaker/d603d9fd8b5112827cac to your computer and use it in GitHub Desktop.
// 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