16 lines
458 B
Plaintext
16 lines
458 B
Plaintext
function MakeList(string sep=". ")
|
|
function MakeItem(integer env, string sep)
|
|
integer counter = getd("counter",env)+1
|
|
setd("counter",counter,env)
|
|
return sprintf("%d%s%s",{counter,sep,{"first","second","third"}[counter]})
|
|
end function
|
|
integer counter = new_dict({{"counter",0}})
|
|
sequence res = {}
|
|
for i=1 to 3 do
|
|
res = append(res,MakeItem(counter,sep))
|
|
end for
|
|
return res
|
|
end function
|
|
|
|
?MakeList()
|