Handbook
Glossary
compare-with ( quots -- <=> )
Vocabulary
sorting
.
extras
Inputs
quots
a
sequence
of a
quotation
with stack effect
( obj -- key )
Outputs
None
Word description
Generate a chained comparator using the specified
quots
sequence of comparators.
Definition
USING:
kernel
math.order
sequences
;
IN:
sorting.extras
MACRO:
compare-with
( quots -- <=> )
[
'[
_
bi@
<=>
]
]
[
'[
_
2check
dup
+eq+
eq?
[
drop
@
]
[
2nip
]
if
]
]
map-reduce
;