Handbook
Glossary
set-splay ( value key tree: splay -- )
Vocabulary
trees
.
splay
.
private
Inputs
value
an
object
key
an
object
tree
a
splay
Outputs
None
Definition
USING:
accessors
kernel
trees.private
typed
;
IN:
trees.splay.private
TYPED:
set-splay
( value key tree: splay -- )
2dup
get-splay
[
2nip
value<<
]
[
drop
dup
inc-count
2dup
splay-split
rot
[
[
swap
]
2dip
node
boa
]
dip
root<<
]
if
;