Next: bst bnodes access, Up: bst bnodes [Index]
The following syntactic bindings are exported by the library
(vicare containers binary-search-trees)
.
Record type representing a node in a binary tree. The
<binary-node>
type is non–generative and available for
subtyping. In this documentation <binary-node>
object
arguments to functions are indicated as bnode.
This type has the following fields:
parent
An instance of <binary-node>
representing the parent node;
#f
if this node has no parent.
left
An instance of <binary-node>
representing the left child, the
root of the left subtree; #f
if this node has no left subtree.
right
An instance of <binary-node>
representing the right child, the
root of the right subtree; #f
if this node has no right subtree.
Build and return a new instance of <binary-node>
. The
optional left and right arguments must be #f
or
instances of <binary-node>
representing the left and right
subtrees. The parent
field of the new instance is set to
#f
.
Return #t
if obj is an instance of <binary-node>
;
otherwise return #f
.