Handbook
Glossary
sort-pair ( a b -- c d )
Vocabulary
sorting
Inputs
a
an
object
b
an
object
Outputs
c
an
object
d
an
object
Word description
If
a
is greater than
b
, exchanges
a
with
b
.
Definition
USING:
kernel
math.order
;
IN:
sorting
:
sort-pair
( a b -- c d )
2dup
after?
[
swap
]
when
;