Created
July 3, 2021 13:19
-
-
Save cgrand/c495746ed844cac06a364ee41b322149 to your computer and use it in GitHub Desktop.
lazy init
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
log(String msg, x) { | |
print(msg); | |
return x; | |
} | |
var a = log("Init A", 1); | |
var b = log("Init B", 2); | |
var c = log("Init C", 3); | |
main() { | |
print(b); | |
print(a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment