Data update
This commit is contained in:
parent
796d366b97
commit
35bcdeebf8
504 changed files with 7045 additions and 610 deletions
13
Task/Nth/Icon/nth-2.icon
Normal file
13
Task/Nth/Icon/nth-2.icon
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
(function ordinal n
|
||||
(if ([11 12 13] (rem n 100))
|
||||
(str n "th")
|
||||
(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))
|
||||
5
Task/Nth/Joy/nth.joy
Normal file
5
Task/Nth/Joy/nth.joy
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue