RosettaCodeData/Task/Loops-N-plus-one-half/Forth/loops-n-plus-one-half-2.fth
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

6 lines
165 B
Forth

: comma-list ( n -- )
dup 1+ 1 do
i 1 .r
dup i = if leave then \ or DROP UNLOOP EXIT to exit loop and the function
[char] , emit space
loop drop ;