Created
February 29, 2012 19:58
-
-
Save sebmarkbage/1943997 to your computer and use it in GitHub Desktop.
Module Function Export
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
module M { | |
function B(){ return 'B'; }; | |
export this A(){ A = B; return 'A'; }; | |
} | |
M(); // 'A' | |
M(); // ? | |
// If the second call yields 'B' then this should be ok as well: | |
module M { | |
var f = function(){}; | |
export this f; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment