I am interested in finding the most concise elegant way of doing the following:
We have a function fun[x1,x2]
and two lists:
ls1={a1,a2,a3,a4,......}
and
ls2={b1,b2,b3,b4,......}
I want my result to be:
Rslt={{{a1,fun[a1,b1]},{a1,fun[a1,b2]},{a1,fun[a1,b3]},.......},
{{a2,fun[a2,b1]},{a2,fun[a2,b2]},{a2,fun[a2,b3]},.......},
{{a3,fun[a3,b1]},{a3,fun[a3,b2]},{a3,fun[a3,b3]},.......},......}
Thanks for help.
Table[{i, func[i, j]}, {i, ls1}, {j, ls2}]
$\endgroup$