Created
December 5, 2009 03:36
-
-
Save cloudhead/249528 to your computer and use it in GitHub Desktop.
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
var Router = { | |
context: { | |
from: function(arg) { | |
return { | |
to: function(arg) { return arg; } | |
} | |
} | |
}, | |
map: function(block) { | |
block.call(this.context); | |
} | |
} | |
Router.map(function() { | |
this.from("paris").to("new york"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment