bci - Binary cell tree iterator
Module Description
The bci module implements an iterator on the binary tree [bct].
Module Words
Iterator Structure
bci%
( -- n )
Get the required space for a bci variable
Iterator creation, initialisation and destruction
bci-init
( bct bci -- )
Initialise the iterator with a binary tree
bci-create
( bct "<spaces>name" -- ; -- bci )
Create a named iterator in the dictionary with a binary tree
bci-new
( bct -- bci )
Create an iterator on the heap with a binary tree
bci-free
( bci -- )
Free the iterator from the heap
Iterator words
bci-get
( bci -- false | x true )
Get the cell data x from the current node
bci-key
( bci -- false | x true )
Get the key x from the current node
bci-set
( x bci -- )
Set the cell data x for the current node
bci-first
( bci -- x true | false )
Move the iterator to the first node, return the cell data x
bci-next
( bci -- x true | false )
Move the iterator to the next node, return the cell data x
bci-move
( x w:bci -- flag )
Move the iterator to the next node with the cell data x
bci-prev
( bci -- x true | false )
Move the iterator to the previous node, return the cell data x
bci-last
( bci -- x true | false )
Move the iterator to the last node, return the cell data x
bci-first?
( bci -- flag )
Check if the iterator is on the first node
bci-last?
( bci -- flag )
Check if the iterator is on the last node
Inspection
bci-dump
( bci -- )
Dump the iterator variable
generated 10-Apr-2008 by
ofcfrth-0.5.0