Handbook
Glossary
human<=> ( obj1 obj2 -- <=> )
Human-friendly sorting
Next:
human>=< ( obj1 obj2 -- >=< )
Vocabulary
sorting
.
human
Inputs
obj1
an
object
obj2
an
object
Outputs
<=>
an ordering specifier
Word description
Compares two objects after converting numbers in the string into integers.
Definition
USING:
math.order
sequences
;
IN:
sorting.human
:
human<=>
( obj1 obj2 -- <=> )
[
find-numbers
[
<alphanum>
]
map
]
compare
;