It looks like if you define variables in a function, then they can't be referenced outside the function. This makes code like the following not work:
function Integer[] cumsum(Integer[] xs) {
acc = 0
for (ix in 1:3) {
acc = acc + xs[ix]
ys[ix] = acc
}
return ys
}
While it would be ideal if such things would work, it might be OK to just document what you can and cannot expect from functions.
It looks like if you define variables in a function, then they can't be referenced outside the function. This makes code like the following not work:
While it would be ideal if such things would work, it might be OK to just document what you can and cannot expect from functions.