to_vec
Builtin index · Collections & strings
result = to_vec(ll)
Input: ll · Output: result
What it is
ll is a linked_list handle.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = to_vec(ll) | ll Listnot documented yet | result List | Returns a List: the linked list's elements, front to back. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
l = linked_list()
l.push_back(1)
l.push_back(2)
l.push_front(0)
print(l.to_vec()) # (0, 1, 2)
print(pop_front(l)) # 0 -- removes from the front
print(pop_back(l)) # 2 -- removes from the back
print(l.to_vec()) # (1) -- what's left
output
(0, 1, 2) 0 2 (1)
from collections-strings
How it works
linked_list() (§ data structures pass, 2026-09-01, that module's own doc comment for why VecDeque rather than a real boxed-node chain.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.