Suppose f is a function of two variables: $f = f(x,y)\quad$ and $L$ is a list. Could someone help me in defining a list of the form: $D = \{f(x,y)\ |\ x \in L,\ y \in L\}$
I tried this:
D = List[ f[x,y], {x,y} ∈ KroneckerProduct[L,L]]
But I got syntax errors.

Dwhich is a defined symbol already in Mathematica. – Verbeia♦ Aug 10 '12 at 20:26D = Table[f[x, y], {x, y} \[Element] Tuples[L, 2]]Table::itform: Argument {x,y}\[Element]Tuples[L,2] at position 2 does not have the correct form for an iterator. >>whereL = {{0, 0, 0, 1}, {0, 1, 1, 0}}. In my question, i didn't need x and y to be the same elements, soTuples[L,2]is more appropriate. I am looking for a functioning code. Let me state it simply, similar to:Flatten[Table[f[x,y], {x, 0, 10}, {y, 0, 10}]]can't we have a similar definition where x and y belong to different lists, say L1 and L2 respectively ? – Pavithran Iyer Aug 10 '12 at 21:21Tableinstead ofList,Tuplesinstead ofKroneckerProductand x and y need not equal vs. need to be equal. – Sjoerd C. de Vries Aug 10 '12 at 22:13