Generic doubly linked list with O(1) removal of arbitrary nodes and O(1) append / move-to-tail operations.
The first list element.
The last list element.
The amount of elements inside the list.
Appends a value and returns its node (you keep it for later removal).
The value to add.
The list node of the just added value.
Clears the list completely.
Moves an existing node to the tail (mark as most recently used).
The node to move to the tail.
Removes the given node in O(1).
The node to remove.
Generic doubly linked list with O(1) removal of arbitrary nodes and O(1) append / move-to-tail operations.