7 lines
225 B
Text
7 lines
225 B
Text
nth2(N) = N.to_string() ++ Th =>
|
|
( tween(N) -> Th = "th"
|
|
; 1 = N mod 10 -> Th = "st"
|
|
; 2 = N mod 10 -> Th = "nd"
|
|
; 3 = N mod 10 -> Th = "rd"
|
|
; Th = "th" ).
|
|
tween(N) => Tween = N mod 100, between(11, 13, Tween).
|