pub fn popLast(list: *DoublyLinkedList) ?*Node
Remove and return a pointer to the last node in the list.
list: *DoublyLinkedList
131 132 133 134 135
pub fn popLast(list: *DoublyLinkedList) ?*Node { const last = list.last orelse return null; list.remove(last); return last; }
Remove and return a pointer to the last node in the list.