I would like to map a function that takes as an argument a list in a list of lists and an element of the list of lists. So for example, this is my list of lists:
{{4,1}, {3,1,1}, {2,2,1}}
I would like to map the function to the list of lists to obtain the following outcome:
{ {f[{4,1},4], f[{4,1},1]}, {f[{3,1,1},3}], f[{3,1,1},1], f[{3,1,1},1] }, {f[{2,2,1},2], f[{2,2,1},2], f[{2,2,1},1]}
I would appreciate it if someone could tell me how to do it. Thank you in advance!
Table[f[i, j], {i, lst}, {j, i}]– WReach Sep 02 '19 at 06:12