I want to build a dictionary that corresponds to an lower triangular array (i.e., a[i,j] only exists if i>j). How can I write a dictionary comprehension that achieves this?
Dict( (i,j) => f(i,j) for j in i+1:N, i in 1:N )
Dict( (i,j) => f(i,j) for i in 1:N, j in i+1:N )
but they both fail with the same error:
ERROR: UndefVarError: i not defined Stacktrace:  top-level scope at none:0