I'm fiddling around with expressions and I'm puzzled why the following tells me that k is not defined. Any thoughts would be appreciated.
# a = is a 3D array
# b = a vector of vectors
vars = [[symbol("i1")]; [symbol("i2")]; [symbol("i3")]]
glomp = :( inner_prod = a[$(vars...)];
for k = 1:size(b,1);
inner_prod *= b[k][$(vars[k])];
end;
)
I realize that it is probably obvious, but the reason eludes me.
