pub fn popFirst(list: *DoublyLinkedList) ?*Node
Remove and return a pointer to the first node in the list.
list: *DoublyLinkedList
141 142 143 144 145
pub fn popFirst(list: *DoublyLinkedList) ?*Node { const first = list.first orelse return null; list.remove(first); return first; }
Remove and return a pointer to the first node in the list.