pub fn popFirst(list: *SinglyLinkedList) ?*Node
Remove and return the first node in the list.
list: *SinglyLinkedList
103 104 105 106 107
pub fn popFirst(list: *SinglyLinkedList) ?*Node { const first = list.first orelse return null; list.first = first.next; return first; }
Remove and return the first node in the list.