Handbook
Glossary
ordinal-ap-style ( n -- str )
Vocabulary
math
.
text
.
english
Inputs
n
an
object
Outputs
str
an
object
Definition
USING:
kernel
math.parser
sequences
;
IN:
math.text.english
:
ordinal-ap-style
( n -- str )
dup
{
f
"first"
"second"
"third"
"fourth"
"fifth"
"sixth"
"seventh"
"eighth"
"ninth"
}
?nth
[
nip
]
[
[
number>string
]
[
ordinal-suffix
]
bi
append
]
if*
;