var globalOne; var globalTwo; fun main() { for (var a = 1; a <= 3; a = a + 1) { fun closure() { print(a); } if (globalOne == nil) { globalOne = closure; } else { globalTwo = closure; } } } main(); globalOne(); # expect: 1 globalTwo(); # expect: 3