|
|
|
|
|
by leafo
4973 days ago
|
|
I've thought about this. It doesn't make as much sense in Lua. An iterated variable it gets it's own local assignment for each iteration. The variable isn't shared like JavaScript: http://moonscript.org/compiler/#14 Here I create 10 functions closed on the loop value. Then I loop over them and call them all. In JavaScript this would print 10 10 times, but in Lua we get the 1 through 10. |
|
Keep up the good work!