I have a function that grabs the second part of the list and change it to times,
mylist = {{{y1, y2, y3}, {y3, y4, y5}}, {{w1, w2, w3}, {w4, w5, w6}}};
g[x_] := x /. List -> Times
Map[g, mylist, {2}]
I wrote it above, but I think I should be able to make it much simpler code using @ # and &. Any suggestion?
g
: you can use/.
as an operator directly:Map[ReplaceAll[List -> Times], mylist, {2}]
, or evenMap[# /. List -> Times &, mylist, {2}]
. $\endgroup$Apply[Times, mylist, {2}]
. It is short and easy to understand. $\endgroup$