RosettaCodeData/Task/Nested-function/Mathematica/nested-function.math

7 lines
186 B
Text
Raw Normal View History

2023-07-01 11:58:00 -04:00
makeList[sep_String]:=Block[
{counter=0, makeItem},
makeItem[item_String]:=ToString[++counter]<>sep<>item;
makeItem /@ {"first", "second", "third"}
]
Scan[Print, makeList[". "]]