M
Modular15mo ago
gryznar

scope of iteration variable

fn main():
var i: Int
for i in range(3):
...
fn main():
var i: Int
for i in range(3):
...
In current state of Mojo, variable i is visible only inside the loop, which means that i outside the loop is another i. Is this only temporary solution or there are greater pros to keep this?
2 Replies
gryznar
gryznarOP15mo ago
Mine 😁
Want results from more Discord servers?
Add your server