sci - Single Linked Cell List Iterator

Module Description

The sci module implements an iterator on the single linked cell list [scl].

Module Words

Iterator structure

sci% ( -- n )
Get the required space for a sci variable

Iterator creation, initialisation and destruction

sci-init ( scl sci -- )
Initialise the iterator with a scl list

sci-create ( scl "<spaces>name" -- ; -- sci )
Create a named iterator in the dictionary on the scl list

sci-new ( scl -- sci )
Create an iterator on the heap on the scl list

sci-free ( sci -- )
Free the iterator from the heap

Member words

sci-get ( sci -- x true | false )
Get the cell data x from the current node

sci-set ( x sci -- )
Set the cell data x for the current node

Iterator words

sci-first ( sci -- x true | false )
Move the iterator to the first node, return the cell data x from this node

sci-next ( sci -- x true | false )
Move the iterator to the next node, return the cell data x from this node

sci-move ( x sci -- flag )
Move the iterator to the next node with the cell data x

sci-first? ( sci -- flag )
Check if the iterator is on the first node

sci-last? ( sci -- flag )
Check if the iterator is on the last node

sci-insert-after ( x sci -- )
Insert the cell data x after the current node

Inspection

sci-dump ( sci -- )
Dump the iterator


generated 10-Apr-2008 by ofcfrth-0.5.0