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

4 lines
150 B
Plaintext

t = ToExpression[StringReplace["[[[1,2],[3,4,1],5]]", {"[" -> "{", "]" -> "}"}]];
p = "Payload#" <> ToString[#] & /@ Range[6];
Map[p[[#]] &, t, {-1}]