Go to the first, previous, next, last section, table of contents.


Accessing elements of a dll

(dll-element dll node)
Get the element of a node in a doubly linked list dll.
(dll-first dll)
Return the first element on the doubly linked list dll. Return nil if the list is empty. The element is not removed.
(dll-nth dll n)
Return the nth node from the doubly linked list dll. n counts from zero. If dll is not that long, nil is returned. If n is negative, return the -(n+1)th last element. Thus, (dll-nth dll 0) returns the first node, and (dll-nth dll -1) returns the last node.
(dll-last dll)
Return the last element on the doubly linked list dll. Return nil if the list is empty. The element is not removed.
(dll-next dll node)
Return the last element on the doubly linked list dll. Return nil if the list is empty. The element is not removed.
(dll-previous dll node)
Return the node before node, or nil if node is the first node.
(dll-all dll)
Return all elements on the double linked list dll as an ordinary list.


Go to the first, previous, next, last section, table of contents.