I have a variable size array of lists and would like to set up a MapThread of the lists with a variable pure function $\{\#1,\#2,...,\#n\}\&$ with $n$ being the number of rows in the array and am unable to code this as if I try constructs like
function = Table[
"#" <> ToString[n],
{n, 1, 5}]
(* {"#1", "#2", "#3", "#4", "#5"} *)
or:
function = Table[
ToString[#] <> ToString[n],
{n, 1, 5}]
(* {"#11", "#12", "#13", "#14", "#15"} *)
and then MapThread the function like:
MapThread[
function &, {{1, 2, 3}, {4, 5, 6}, {1, 2, 3}, {4, 5, 6}, {1, 2,3}}]
I receive the error
incompatible dimensions of objects at positions {2, 4} and {2, 5} of
MapThread[function&,{{1,2,3},{4,5,6},{1,2,3},{4,5,6},{1,2.3}}];
dimensions are 3 and 2
Can someone help me with this or perhaps refer a link that would demonstrate this type of construct?
Thanks.