Consider:
for k in 0:8 println(k) end # works
println([k for k in 0:8]) # works
for k in 0:8, j in 0:k println(binomial(k,j)) end # works
println([binomial(k, j) for k in 0:8, j in 0:k]) # !works
The last line gives: UndefVarError: k not defined.
Why?