REPL and for loops (scope behavior change)

Thanks for the interest. My original problem lives here: Global Scope Confusion