singly-linked list
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
oo::class create List {
    variable content next
    constructor {value {list ""}} {
        set content $value
        set next $list
    }
    method value args {
        set content {*}$args
    }
    method attach {list} {
        set next $list
    }
    method detach {} {
        set next ""
    }
    method next {} {
        return $next
    }
    method print {} {
        for {set n [self]} {$n ne ""} {set n [$n next]} {
            lappend values [$n value]
        }
        return $values
    }
}