Handbook
Glossary
pick-balances ( a node -- balance balance )
Vocabulary
trees
.
avl
.
private
Inputs
a
an
object
node
an
object
Outputs
balance
an
object
balance
an
object
Definition
USING:
accessors
combinators
kernel
math
;
IN:
trees.avl.private
:
pick-balances
( a node -- balance balance )
balance>>
{
{
[
dup
zero?
]
[
2drop
0 0
]
}
{
[
2dup
=
]
[
nip
neg
0
]
}
[
drop
0
swap
]
}
cond
;