DoxigAlpha

removeNext

Remove the node after the one provided, returning it.

Function parameters

Parameters

#
node:*Node

This struct contains only a next pointer and not any data payload.

Types

#
Node
This struct contains only a next pointer and not any data payload.

Functions in this namespace

Functions

#
popFirst
Remove and return the first node in the list.
len
Iterate over all nodes, returning the count.

Source

Implementation

#
pub fn removeNext(node: *Node) ?*Node {
    const next_node = node.next orelse return null;
    node.next = next_node.next;
    return next_node;
}