Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@fredrick
Created February 11, 2012 23:36
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 fredrick/1805108 to your computer and use it in GitHub Desktop.
Save fredrick/1805108 to your computer and use it in GitHub Desktop.
Prototype monads/currying
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