Handbook
Glossary
heap-compare ( entry1 entry2 heap -- ? )
Vocabulary
heaps
.
private
Inputs
entry1
an
object
entry2
an
object
heap
an
object
Outputs
?
an
object
Definition
IN:
heaps.private
GENERIC:
heap-compare
( entry1 entry2 heap -- ? )
Methods
USING:
accessors
heaps
heaps.private
kernel
kernel.private
math.order
;
M:
max-heap
heap-compare
drop
{
entry
entry
}
declare
[
key>>
]
bi@
before?
;
inline
USING:
accessors
heaps
heaps.private
kernel
kernel.private
math.order
;
M:
min-heap
heap-compare
drop
{
entry
entry
}
declare
[
key>>
]
bi@
after?
;
inline