Created
September 2, 2015 10:29
-
-
Save monolithed/9c0db4f3932d6713f9d3 to your computer and use it in GitHub Desktop.
Lazy evaluation
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 fn = function (x) { return x; } | |
| var test = function (x) { | |
| var a = fn(x); | |
| test = function (x) { | |
| return a + x; | |
| } | |
| return test.apply(this, arguments); | |
| } | |
| test(1); // 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment