|
dni
Generic Double Linked List Iterator
Module DescriptionThe dni module implements an iterator on the generic double linked list dnl. Module WordsIterator structuredni% ( -- n ) Get the required space for a dni variable Iterator creation, initialisation and destructiondni-init ( dnl dni -- ) Initialise the iterator with a dnl listdni-create ( dnl "<spaces>name" -- ; -- dni ) Create a named iterator in the dictionary with a dnl listdni-new ( dnl -- dni ) Create an iterator on the heapdni-free ( dni -- ) Free the iterator from the heap Member wordsdni-get ( dni -- dnn | nil ) Get the current node Iterator wordsdni-first ( dni -- dnn | nil ) Move the iterator to the first node, return this nodedni-next ( dni -- dnn | nil ) Move the iterator to the next node, return this nodedni-prev ( dni -- dnn | nil ) Move the iterator to the previous node, return this nodedni-last ( dni -- dnn | nil ) Move the iterator to the last node, return this nodedni-first? ( dni -- flag ) Check if the iterator is on the first nodedni-last? ( dni -- flag ) Check if the iterator is on the last node Inspectiondni-dump ( dni -- ) Dump the iterator variable Generated by ofcfrth-0.10.0 |