Wrathgon recently tried to code something with a basic structure like this:
Code: Select all
[r,c(1),code:{
[h,foreach(letter,"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o"),code:{
[h:num=roll.count]
}]
[r:roll.count]
}]
This reports 15, I believe because foreach() also uses a hidden variable roll.count to track where it is in the string. This is a problem because his code is such that he needs to run the foreach before referencing roll.count. Moreover, if the foreach() sets roll.count high enough, the c() function will terminate after just the initial runthrough.
I believe the solution would be as simple as setting foreach() to use a variable by a different name than roll.count (I recommend for.count), but I'm just guessing.