12 lines
256 B
Plaintext

wapp_runtime_assert(index < list->node_count, "`index` is out of bounds");
{NodeType} *output = NULL;
{NodeType} *current = list->first;
for (u64 i = 1; i <= index; ++i) {{
current = current->next;
}}
output = current;
return output;