doublell
    Preparing search index...

    Type Alias DoubleLinkedListNode<ItemT>

    DoubleLinkedListNode: [
        list: DoubleLinkedList<ItemT>
        | undefined,
        value: ItemT,
        prev: DoubleLinkedListNode<ItemT> | undefined,
        next: DoubleLinkedListNode<ItemT> | undefined,
    ]

    A node in a DoubleLinkedList containing a value and references to adjacent nodes. Implemented as a tuple for optimal memory layout and performance.

    Type Parameters

    • ItemT

      The type of the value stored in this node

      Tuple structure: [list, value, previousNode, nextNode]

      • Index 0: Reference to the list that owns this node (undefined after removal)
      • Index 1: The immutable value stored in this node
      • Index 2: Reference to the previous node, or undefined if this is the first node
      • Index 3: Reference to the next node, or undefined if this is the last node
    const list = new DoubleLinkedList('a', 'b', 'c');
    let node = list.getHead();
    while (node) {
    console.log(getNodeValue(node)); // 'a', 'b', 'c' - access value at index 1
    node = getNextNode(node); // next node at index 3
    }
    import { nodeValue, nodeNext } from 'doublell';

    const list = new DoubleLinkedList('a', 'b', 'c');
    let node = list.getHead();
    while (node) {
    console.log(nodeValue(node)); // 'a', 'b', 'c'
    node = nodeNext(node);
    }