Function popFirst [src]

Remove and return the first node in the list.

Prototype

pub fn popFirst(list: *SinglyLinkedList) ?*Node

Parameters

list: *SinglyLinkedList

Source

pub fn popFirst(list: *SinglyLinkedList) ?*Node { const first = list.first orelse return null; list.first = first.next; return first; }