15 lines
360 B
Text
15 lines
360 B
Text
function quibble(sequence words)
|
|
if length(words)>=2 then
|
|
words[-2..-1] = {words[-2]&" and "&words[-1]}
|
|
end if
|
|
return "{"&join(words,", ")&"}"
|
|
end function
|
|
|
|
constant tests = {{},
|
|
{"ABC"},
|
|
{"ABC","DEF"},
|
|
{"ABC","DEF","G","H"}}
|
|
|
|
for i=1 to length(tests) do
|
|
?quibble(tests[i])
|
|
end for
|