RosettaCodeData/Task/Nested-templated-data/Mathematica/nested-templated-data.math

4 lines
150 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
t = ToExpression[StringReplace["[[[1,2],[3,4,1],5]]", {"[" -> "{", "]" -> "}"}]];
p = "Payload#" <> ToString[#] & /@ Range[6];
Map[p[[#]] &, t, {-1}]