Stdlib module collections/linkedlist.vitl
This page is a wiki-style reference for one concrete stdlib file. It explains what the file owns, where it fits in the family, and how to decide whether this is the right surface to depend on.
collections/linkedlist.vitl.Family: collections
Kind: public stdlib surface
Page style: this reference follows the same “encyclopedic card + portrait + usage contract” logic as the keyword pages, but for stdlib modules.
Summary
Overview
| Field | Value |
|---|---|
| Path | collections/linkedlist.vitl |
| Family | collections |
| Kind | public stdlib surface |
| Line count | 69 |
| Declared procedures | 13 |
| Declared forms/picks | 2 |
`collections/linkedlist.vitl` is a public stdlib surface inside the `collections` family. It should be read as one focused slice of the broader family responsibility: Container and traversal surfaces such as vector, deque, queue, stack, linked list, hashmap, hashset, graph, and matrix.
Purpose
This file should be chosen because of responsibility, not because its name “sounds close enough”. Inside the collections family, it carries one focused part of the contract and keeps that responsibility separate from neighboring concerns.
- Use this module when ordered storage and traversal cost are more important than host-facing effects.
- A build report groups diagnostics in a vector and indexes them in a hashmap.
- A scheduler stores pending work in a queue or deque.
- A graph or matrix page should explain why those shapes exist, not just list filenames.
Top-level API inventory
| Surface | Items |
|---|---|
| Procedures | _alloc_node, _free_node, list_new, list_push_front, list_push_back, list_pop_front, list_pop_back, list_front, list_back, list_to_array, list_size, list_is_empty |
| Forms | ListNode, LinkedList |
| Picks | none declared at top level |
| Constants | NIL |
Imported surfaces
This file does not advertise a top-level `use` surface in its opening declarations. That often means it is either self-contained or an aggregation layer.
How to use this module
Start by reading the file as an ownership boundary. Ask three questions: what enters this module, what stable types or procedures it exports, and what adjacent module should stay outside of it.
- Open the family page first to understand why this area of the stdlib exists.
- Read the source excerpt below to see the namespace, imports, and first declared surfaces.
- Check the neighbor list to avoid coupling this module with an adjacent responsibility by habit.
Source shape
space vitte/stdlib_checked/collections_linkedlist
const NIL: i64 = 0
form ListNode {
value: int
}
form LinkedList {
value: int
}
proc _alloc_node() -> int {
give 0
The excerpt is not meant to replace the file. It exists to make the module recognizable at first glance, the same way a Wikipedia infobox helps the reader orient before reading the whole article.
Integration boundaries
Within collections, this file should remain focused. If a future helper changes the host boundary, scheduling boundary, or data-shape boundary, it probably belongs in a neighbor module instead of being added here by convenience.
- Family responsibility: Container and traversal surfaces such as vector, deque, queue, stack, linked list, hashmap, hashset, graph, and matrix.
- Family architecture role: Use `collections` when the shape of data matters more than the host system. This family owns grouping, ordering, indexing, and traversal concerns.