RosettaCodeData/Task/Nested-function/Mathematica/nested-function.math
2023-07-01 11:58:00 -04:00

6 lines
186 B
Text

makeList[sep_String]:=Block[
{counter=0, makeItem},
makeItem[item_String]:=ToString[++counter]<>sep<>item;
makeItem /@ {"first", "second", "third"}
]
Scan[Print, makeList[". "]]