dcl - Double Linked Cell List

Module Description

The dcl module implements a double linked list that can store cell wide data.

Module Words

List structure

dcl% ( - n )
Get the required space for the dcl data structure

List creation, initialisation and destruction

dcl-init ( w:dcl - )
Initialise the dcl-list

dcl-create ( C: "name" - R: - w:dcl )
Create a named dcl-list in the dictionary

dcl-new ( - w:dcl )
Create a new dcl-list on the heap

dcl-delete-all ( w:dcl - )
Delete and free all nodes in the list

dcl-free ( w:dcl - )
Free the list from the heap, including the nodes

Member words

dcl-empty? ( w:dcl - f )
Check for empty list

dcl-length@ ( w:dcl - u )
Get the number of nodes in the list

dcl-compare! ( xt w:dcl - )
Set the compare execution token for sorting the list

dcl-compare@ ( w:dcl - xt )
Get the compare execution token for sorting the list

List words

dcl-append ( w:data w:dcl - )
Append the cell data in the list

dcl-prepend ( w:data w:dcl - )
Prepend the cell data in the list

Index words

dcl-index? ( n:index w:dcl - f )
Check if index is valid for the list

dcl-set ( w:data n:index w:dcl - )
Set the cell data in the indexth node in the list

dcl-get ( n:index w:dcl - w:data )
Get the cell data from the indexth node from the list

dcl-insert ( w n:index w:dcl - )
Insert cell data at the indexth node in the list

dcl-delete ( n:index w:dcl - w )
Delete the indexth node from the list

Special words

dcl-count ( w:data w:dcl - u )
Count the occurences of cell data in the list

dcl-execute ( ... xt w:dcl - ... )
Execute xt for every cell data in list

dcl-reverse ( w:dcl - )
Reverse or mirror the list

Search words

dcl-find ( w:data w:dcl - n:index )
Find the first index for the cell data in the list, -1 for not found

dcl-has? ( w:data w:dcl - f )
Check if the cell data is present in the list

dcl-remove ( w:data w:dcl - f )
Remove the first occurence of the cell data from the list

Sort words

dcl-insert-sorted ( w:data w:dcl - )
Insert the cell data sorted in the list

Inspection

dcl-dump ( w:dcl - )
Dump the list


generated 09-Jan-2007 by ofcfrth-0.2.0