1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* As you see, the language supports variable scopes */ let x = 18; let foo = () => i64 { let x = 1; printf("%d", x); return x; }; let main = () => i64 { printf("%d", x); let x = 2; let y = foo(); printf("%d", x); return x + y; };