Created
February 11, 2012 23:36
-
-
Save fredrick/1805108 to your computer and use it in GitHub Desktop.
Prototype monads/currying
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
function In(drive) { | |
this.drive = drive; | |
} | |
function Within(path) { | |
this.path = path; | |
} | |
In.prototype.within = function(path) { | |
var within = new Within(path); | |
within.drive = this.drive; | |
return within; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment