RosettaCodeData/Task/Nth/Joy/nth.joy

6 lines
237 B
Plaintext

DEFINE
suffix == abs 89 + 100 rem 9 - 10 rem [{1 2 3} in] [] [pop 0] ifte ["th" "st" "nd" "rd"] of;
nth == ['d 1 1 format] [suffix] cleave concat.
[0 250 1000] [25 [dup nth putchars ' putch succ] times nth putchars '\n putch] step.