Function popFirst [src]

Remove and return the first node in the list. Returns: A pointer to the first node in the list.

Prototype

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

Parameters

list: *DoublyLinkedList

Source

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