Traverse from the beginning of a singly-linked list to the end.



See also

 Array
 Associative array: Creation, Iteration
 Collections
 Compound data type
 Doubly-linked list: Definition, Element definition, Element insertion, List Traversal, Element Removal
 Linked list
 Queue: Definition, Usage
 Set
 Singly-linked list: Element definition, Element insertion, List Traversal, Element Removal
 Stack


def \Node\ Link, Data;          \linked list element definition
int Node, List;
[Node:= List;                   \traverse the linked list
while Node # 0 do
    Node:= Node(Link);          \move to next node
]