RosettaCodeData/Task/Nth/J/nth-1.j

3 lines
89 B
Plaintext

suf=: (;:'th st nd rd th') {::~ 4 <. 10 10 (* 1&~:)~/@#: ]
nth=: [: ;:inv (": , suf)each