Handbook
Glossary
balance-insert ( node -- node taller? )
Vocabulary
trees
.
avl
.
private
Inputs
node
an
object
Outputs
node
an
object
taller?
an
object
Definition
USING:
accessors
combinators
kernel
math
trees.private
;
IN:
trees.avl.private
:
balance-insert
( node -- node taller? )
dup
balance>>
{
{
[
dup
zero?
]
[
drop
f
]
}
{
[
dup
abs
2
=
]
[
sgn
neg
[
select-rotate
]
with-side
f
]
}
[
drop
t
]
}
cond
;