Created
May 3, 2014 13:05
-
-
Save igstan/3dbe8533a73c0409cec6 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
// Dependency comes first when currying: OO-style constructors. | |
function foo(dependency) { | |
return function (a) { | |
return dependency(a); | |
} | |
} | |
// Dependency comes last when currying: Reader Monad. | |
function foo(a) { | |
return function (dependency) { | |
return dependency(a); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment