2023-10-02 18:11:16 -07:00
|
|
|
(function ordinal n
|
|
|
|
|
(if ([11 12 13] (rem n 100))
|
2026-02-01 16:33:20 -08:00
|
|
|
"{n}th"
|
2023-10-02 18:11:16 -07:00
|
|
|
(str n (or ((rem n 10) ["th" "st" "nd" "rd"]) "th"))))
|
|
|
|
|
|
|
|
|
|
(function line x y
|
|
|
|
|
(-> (range x y)
|
|
|
|
|
(map (comp ordinal (pad-left " " 6)))
|
|
|
|
|
(join " ")))
|
|
|
|
|
|
|
|
|
|
(.. str (line 0 13) "\n" (line 1000 1013)
|
|
|
|
|
"\n\n" (line 13 26) "\n" (line 1013 1026)
|
|
|
|
|
"\n\n" (line 250 266))
|