Stdlib module collections.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.

Visual portrait of collections.vitl
Wiki-style portrait for collections.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

FieldValue
Pathcollections.vitl
Familycollections
Kindpublic stdlib surface
Line count705
Declared procedures152
Declared forms/picks17

`collections.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.

  • 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.

Taxonomy

Think of this page as a generated encyclopedia entry rather than a hand-written tutorial. The goal is to show what kind of module this is, how dense it is, and what reading strategy makes sense before depending on it.

  • Large algorithm surface: this file exposes many procedures and likely acts as a domain toolkit rather than a single thin wrapper.
  • Owns domain vocabulary: the module declares data shapes in addition to executable helpers, so its types are part of the contract.
  • Has tuning constants: part of the module behavior is controlled by named constants that document default precision, limits, or policy.
  • Minimal top-level dependencies: the module reads as mostly self-contained from its opening declarations.

Implementation profile

This profile is inferred directly from the source text. It does not replace reading the file, but it tells you quickly whether the module is mostly declarative, loop-heavy, branch-heavy, or organized around many small exits.

SignalCountWhat it suggests
if0Branching density and local decision-making.
while0Loop-heavy or iterative implementation style.
for0Collection-style traversal at source level.
match0Variant-driven branching or grammar-style decoding.
let0Local state and intermediate value density.
give152Number of explicit exit points and result shaping.

Top-level API inventory

SurfaceItems
Procedurescollection_error_name, option_i64_none, option_i64_some, option_string_none, option_string_some, vector_new, vector_with_capacity, vector_from_array, vector_len, vector_size, vector_capacity, vector_is_empty
FormsOptionI64, OptionString, CollectionResult, Vector, Pair, Indexed, Range, ListNode, LinkedList, Queue, Deque, Stack
PicksOrdering
ConstantsCOLLECTION_OK, COLLECTION_ERR, COLLECTION_ERR_EMPTY, COLLECTION_ERR_BOUNDS, COLLECTION_ERR_NOT_FOUND, COLLECTION_ERR_FULL, COLLECTION_ERR_DUPLICATE, DEFAULT_CAPACITY, GROWTH_FACTOR, HASHMAP_MAX_LOAD_NUM, HASHMAP_MAX_LOAD_DEN
Exportsnone declared at top level

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.

Position in family

This file is module 1 of 11 in the collections family when ordered by path. By procedure count it ranks 1, and by line count it ranks 1. Those ranks are useful as rough signals of breadth, not as quality judgments.

Declaration map

The declaration map turns raw source into a scan-friendly catalog. It is useful when the file is large enough that a reader wants to orient by kinds of surfaces first.

LineNameKindRole
1vitte/stdlib_checked/collectionsspaceDeclares the namespace that anchors this file in the stdlib tree.
9COLLECTION_OKconstDefines a named constant reused across the module.
11COLLECTION_ERRconstDefines a named constant reused across the module.
13COLLECTION_ERR_EMPTYconstDefines a named constant reused across the module.
15COLLECTION_ERR_BOUNDSconstDefines a named constant reused across the module.
17COLLECTION_ERR_NOT_FOUNDconstDefines a named constant reused across the module.
19COLLECTION_ERR_FULLconstDefines a named constant reused across the module.
21COLLECTION_ERR_DUPLICATEconstDefines a named constant reused across the module.
23DEFAULT_CAPACITYconstDefines a named constant reused across the module.
25GROWTH_FACTORconstDefines a named constant reused across the module.
27HASHMAP_MAX_LOAD_NUMconstDefines a bound or precision constant that shapes runtime behavior.
29HASHMAP_MAX_LOAD_DENconstDefines a bound or precision constant that shapes runtime behavior.
31OptionI64formIntroduces a structured data shape that other procedures can exchange.
35OptionStringformIntroduces a structured data shape that other procedures can exchange.
39CollectionResultformIntroduces a structured data shape that other procedures can exchange.
43VectorformIntroduces a structured data shape that other procedures can exchange.
47PairformIntroduces a structured data shape that other procedures can exchange.
51IndexedformIntroduces a structured data shape that other procedures can exchange.
55RangeformIntroduces a structured data shape that other procedures can exchange.
59ListNodeformIntroduces a structured data shape that other procedures can exchange.
63LinkedListformIntroduces a structured data shape that other procedures can exchange.
67QueueformIntroduces a structured data shape that other procedures can exchange.
71DequeformIntroduces a structured data shape that other procedures can exchange.
75StackformIntroduces a structured data shape that other procedures can exchange.
79HashEntryformIntroduces a structured data shape that other procedures can exchange.
83HashMapformIntroduces a structured data shape that other procedures can exchange.
87HashSetformIntroduces a structured data shape that other procedures can exchange.
91BinaryHeapformIntroduces a structured data shape that other procedures can exchange.
95OrderingpickIntroduces a tagged variant type used to model distinct outcomes.
99collection_error_nameprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
103option_i64_noneprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
107option_i64_someprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
111option_string_noneprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
115option_string_someprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
119vector_newprocOwns a concrete data shape or the operations that maintain it.
123vector_with_capacityprocOwns a concrete data shape or the operations that maintain it.
127vector_from_arrayprocOwns a concrete data shape or the operations that maintain it.
131vector_lenprocOwns a concrete data shape or the operations that maintain it.
135vector_sizeprocOwns a concrete data shape or the operations that maintain it.
139vector_capacityprocOwns a concrete data shape or the operations that maintain it.
143vector_is_emptyprocOwns a concrete data shape or the operations that maintain it.
147vector_is_valid_indexprocOwns a concrete data shape or the operations that maintain it.
151vector_reserveprocOwns a concrete data shape or the operations that maintain it.
155vector_pushprocOwns a concrete data shape or the operations that maintain it.
159vector_pop_i64procOwns a concrete data shape or the operations that maintain it.
163vector_popprocOwns a concrete data shape or the operations that maintain it.
167vector_get_i64procOwns a concrete data shape or the operations that maintain it.
171vector_at_i64procOwns a concrete data shape or the operations that maintain it.
175vector_set_i64procOwns a concrete data shape or the operations that maintain it.
179vector_insert_i64procOwns a concrete data shape or the operations that maintain it.
183vector_remove_i64procOwns a concrete data shape or the operations that maintain it.
187vector_clearprocOwns a concrete data shape or the operations that maintain it.
191vector_to_arrayprocOwns a concrete data shape or the operations that maintain it.
195vector_cloneprocOwns a concrete data shape or the operations that maintain it.
199vector_extendprocOwns a concrete data shape or the operations that maintain it.
203vector_contains_i64procOwns a concrete data shape or the operations that maintain it.
207vector_index_of_i64procOwns a concrete data shape or the operations that maintain it.
211vector_reverse_i64procOwns a concrete data shape or the operations that maintain it.
215vector_sum_i64procOwns a concrete data shape or the operations that maintain it.
219vector_min_i64procOwns a concrete data shape or the operations that maintain it.
223vector_max_i64procOwns a concrete data shape or the operations that maintain it.
227vector_sort_i64procOwns a concrete data shape or the operations that maintain it.
231vector_binary_search_i64procOwns a concrete data shape or the operations that maintain it.
235copyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
239list_newprocOwns a concrete data shape or the operations that maintain it.
243list_lenprocOwns a concrete data shape or the operations that maintain it.
247list_sizeprocOwns a concrete data shape or the operations that maintain it.
251list_is_emptyprocOwns a concrete data shape or the operations that maintain it.
255list_push_backprocOwns a concrete data shape or the operations that maintain it.
259list_push_frontprocOwns a concrete data shape or the operations that maintain it.
263list_clearprocOwns a concrete data shape or the operations that maintain it.
267list_to_arrayprocOwns a concrete data shape or the operations that maintain it.
271queue_newprocOwns a concrete data shape or the operations that maintain it.
275queue_lenprocOwns a concrete data shape or the operations that maintain it.
279queue_sizeprocOwns a concrete data shape or the operations that maintain it.
283queue_is_emptyprocOwns a concrete data shape or the operations that maintain it.
287queue_is_fullprocOwns a concrete data shape or the operations that maintain it.
291queue_enqueueprocOwns a concrete data shape or the operations that maintain it.
295queue_dequeue_i64procOwns a concrete data shape or the operations that maintain it.
299queue_front_i64procOwns a concrete data shape or the operations that maintain it.
303queue_clearprocOwns a concrete data shape or the operations that maintain it.
307deque_newprocOwns a concrete data shape or the operations that maintain it.
311deque_is_emptyprocOwns a concrete data shape or the operations that maintain it.
315deque_is_fullprocOwns a concrete data shape or the operations that maintain it.
319deque_push_backprocOwns a concrete data shape or the operations that maintain it.
323deque_push_front_i64procOwns a concrete data shape or the operations that maintain it.
327deque_pop_back_i64procOwns a concrete data shape or the operations that maintain it.
331deque_pop_front_i64procOwns a concrete data shape or the operations that maintain it.
335stack_newprocOwns a concrete data shape or the operations that maintain it.
339stack_lenprocOwns a concrete data shape or the operations that maintain it.
343stack_sizeprocOwns a concrete data shape or the operations that maintain it.
347stack_is_emptyprocOwns a concrete data shape or the operations that maintain it.
351stack_is_fullprocOwns a concrete data shape or the operations that maintain it.
355stack_pushprocOwns a concrete data shape or the operations that maintain it.
359stack_pop_i64procOwns a concrete data shape or the operations that maintain it.
363stack_peek_i64procOwns a concrete data shape or the operations that maintain it.
367stack_clearprocOwns a concrete data shape or the operations that maintain it.
371hashmap_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
375hashmap_empty_entriesprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
379hashmap_lenprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
383hashmap_sizeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
387hashmap_is_emptyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
391hashmap_load_percentprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
395hashmap_should_growprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
399hash_stringprocImplements a security-sensitive transformation in the crypto boundary.
403hashmap_find_slotprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
407hashmap_containsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
411hashmap_insertprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
415hashmap_removeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
419hashmap_clearprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
423hashmap_rehashprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
427hashmap_keysprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
431hashmap_get_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
435hashmap_values_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
439hashmap_items_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
443hashset_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
447hashset_with_capacityprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
451hashset_insertprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
455hashset_removeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
459hashset_containsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
463hashset_sizeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
467hashset_lenprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
471hashset_is_emptyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
475hashset_clearprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
479hashset_valuesprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
483hashset_unionprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
487hashset_intersectionprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
491hashset_differenceprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
495heap_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
499heap_lenprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
503heap_is_emptyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
507min_heap_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
511max_heap_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
515heap_should_swap_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
519heap_push_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
523heap_peek_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
527range_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
531range_lenprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
535range_to_arrayprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
539rangeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
543range2procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
547range3procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
551zipprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
555enumerateprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
559reversedprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
563array_is_emptyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
567array_first_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
571array_last_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
575array_sum_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
579array_product_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
583array_contains_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
587array_index_of_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
591array_count_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
595array_unique_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
599array_filter_nonzero_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
603array_map_double_i64procOwns a concrete data shape or the operations that maintain it.
607array_sort_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
611normalize_capacityprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
615min_i32procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
619max_i32procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
623clamp_i32procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
627compare_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
631zero_valueprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
635array_lenprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
639array_copyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
643array_getprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
647array_setprocOwns a concrete data shape or the operations that maintain it.
651array_pushprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
655array_takeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
659array_dropprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
663array_get_i64procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
667array_set_i64procOwns a concrete data shape or the operations that maintain it.
671array_get_stringprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
675string_lenprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
679string_char_codeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
683stdlib_smoke_6procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
687stdlib_smoke_7procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
691stdlib_smoke_8procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
695stdlib_smoke_9procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
699stdlib_smoke_10procRepresents one top-level surface in the file contract and should be read as part of the module boundary.
703stdlib_smoke_11procRepresents one top-level surface in the file contract and should be read as part of the module boundary.

The table is exhaustive for top-level declarations of the selected kinds. This file declares 181 matching surfaces.

Representative signatures

These signatures are shown in source order so the page keeps the feel of a reference manual, not just a keyword cloud.

  • const COLLECTION_OK: i32 = 0 (line 9)
  • const COLLECTION_ERR: i32 = 0 (line 11)
  • const COLLECTION_ERR_EMPTY: i32 = 0 (line 13)
  • const COLLECTION_ERR_BOUNDS: i32 = 0 (line 15)
  • const COLLECTION_ERR_NOT_FOUND: i32 = 0 (line 17)
  • const COLLECTION_ERR_FULL: i32 = 0 (line 19)
  • const COLLECTION_ERR_DUPLICATE: i32 = 0 (line 21)
  • const DEFAULT_CAPACITY: i32 = 0 (line 23)
  • const GROWTH_FACTOR: i32 = 0 (line 25)
  • const HASHMAP_MAX_LOAD_NUM: i32 = 0 (line 27)
  • const HASHMAP_MAX_LOAD_DEN: i32 = 0 (line 29)
  • form OptionI64 { (line 31)
  • form OptionString { (line 35)
  • form CollectionResult { (line 39)
  • form Vector { (line 43)
  • form Pair { (line 47)
  • form Indexed { (line 51)
  • form Range { (line 55)

The list is intentionally capped here; the source file declares 180 matching signatures in total.

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.

  1. Read space and top-level imports first so the ownership boundary of collections.vitl is explicit.
  2. Scan constants before procedures; they often encode precision, limits, or policy assumptions that explain later behavior.
  3. Read declared forms and picks before algorithms so the data vocabulary is stable in your head.
  4. Traverse procedures in source order; the early helpers usually explain the naming and numeric conventions used later.
  5. Only after that compare neighbor modules, because the right boundary choice matters more than memorizing one helper name.

User example

This example is generated from the actual stdlib module surface. Its job is not to be the smallest snippet possible; its job is to show a realistic consumer-shaped file that exercises the module and mirrors the language keywords the module itself relies on.

space demo/collections
const SAMPLE_LABEL: string = "demo"
form UserReport {
  label: string,
  ready: bool
}
pick UserOutcome {
  case Ready(message: string)
  case Empty(reason: string)
}
proc run_example() -> UserOutcome {
    give UserOutcome.Ready("ok")
}

Keyword coverage

This table makes the “all keywords of the module” requirement auditable. It compares the detected Vitte keywords in the source file with the generated consumer example above.

KeywordPresent in module sourceUsed in generated user example
spaceyesyes
constyesyes
formyesyes
pickyesyes
procyesyes
giveyesyes

The generated snippet exercises every detected Vitte keyword used by this module.

Source shape

space vitte/stdlib_checked/collections
const COLLECTION_OK: i32 = 0
const COLLECTION_ERR: i32 = 0
const COLLECTION_ERR_EMPTY: i32 = 0
const COLLECTION_ERR_BOUNDS: i32 = 0
const COLLECTION_ERR_NOT_FOUND: i32 = 0
const COLLECTION_ERR_FULL: i32 = 0
const COLLECTION_ERR_DUPLICATE: i32 = 0
const DEFAULT_CAPACITY: i32 = 0
const GROWTH_FACTOR: i32 = 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.

Source landmarks

Large files are easier to retain when they have visible landmarks. When the source contains explicit section banners, they are surfaced here; otherwise the first major declarations are used as anchors.

  • Line 1: space vitte/stdlib_checked/collections
  • Line 9: const COLLECTION_OK: i32 = 0
  • Line 11: const COLLECTION_ERR: i32 = 0
  • Line 13: const COLLECTION_ERR_EMPTY: i32 = 0
  • Line 15: const COLLECTION_ERR_BOUNDS: i32 = 0
  • Line 17: const COLLECTION_ERR_NOT_FOUND: i32 = 0
  • Line 19: const COLLECTION_ERR_FULL: i32 = 0
  • Line 21: const COLLECTION_ERR_DUPLICATE: i32 = 0

Source organization

When a file carries its own internal chaptering, those chapters usually reveal the intended reading order better than a flat symbol list. This section reconstructs that organization from the source itself.

File surfaces

Top-level items: 181. Procedures: 152. Data surfaces: 17. Constants: 11.

First visible names: vitte/stdlib_checked/collections, COLLECTION_OK, COLLECTION_ERR, COLLECTION_ERR_EMPTY, COLLECTION_ERR_BOUNDS, COLLECTION_ERR_NOT_FOUND, COLLECTION_ERR_FULL, COLLECTION_ERR_DUPLICATE, DEFAULT_CAPACITY, GROWTH_FACTOR

Complete API catalog

This catalog is the exhaustive file-level index for the module. It is intentionally closer to a generated encyclopedia appendix than to a tutorial summary.

Constants

LineNameSignatureRole
9COLLECTION_OKconst COLLECTION_OK: i32 = 0Defines a named constant reused across the module.
11COLLECTION_ERRconst COLLECTION_ERR: i32 = 0Defines a named constant reused across the module.
13COLLECTION_ERR_EMPTYconst COLLECTION_ERR_EMPTY: i32 = 0Defines a named constant reused across the module.
15COLLECTION_ERR_BOUNDSconst COLLECTION_ERR_BOUNDS: i32 = 0Defines a named constant reused across the module.
17COLLECTION_ERR_NOT_FOUNDconst COLLECTION_ERR_NOT_FOUND: i32 = 0Defines a named constant reused across the module.
19COLLECTION_ERR_FULLconst COLLECTION_ERR_FULL: i32 = 0Defines a named constant reused across the module.
21COLLECTION_ERR_DUPLICATEconst COLLECTION_ERR_DUPLICATE: i32 = 0Defines a named constant reused across the module.
23DEFAULT_CAPACITYconst DEFAULT_CAPACITY: i32 = 0Defines a named constant reused across the module.
25GROWTH_FACTORconst GROWTH_FACTOR: i32 = 0Defines a named constant reused across the module.
27HASHMAP_MAX_LOAD_NUMconst HASHMAP_MAX_LOAD_NUM: i32 = 0Defines a bound or precision constant that shapes runtime behavior.
29HASHMAP_MAX_LOAD_DENconst HASHMAP_MAX_LOAD_DEN: i32 = 0Defines a bound or precision constant that shapes runtime behavior.

Data surfaces

LineNameSignatureRole
31OptionI64form OptionI64 {Introduces a structured data shape that other procedures can exchange.
35OptionStringform OptionString {Introduces a structured data shape that other procedures can exchange.
39CollectionResultform CollectionResult {Introduces a structured data shape that other procedures can exchange.
43Vectorform Vector {Introduces a structured data shape that other procedures can exchange.
47Pairform Pair {Introduces a structured data shape that other procedures can exchange.
51Indexedform Indexed {Introduces a structured data shape that other procedures can exchange.
55Rangeform Range {Introduces a structured data shape that other procedures can exchange.
59ListNodeform ListNode {Introduces a structured data shape that other procedures can exchange.
63LinkedListform LinkedList {Introduces a structured data shape that other procedures can exchange.
67Queueform Queue {Introduces a structured data shape that other procedures can exchange.
71Dequeform Deque {Introduces a structured data shape that other procedures can exchange.
75Stackform Stack {Introduces a structured data shape that other procedures can exchange.
79HashEntryform HashEntry {Introduces a structured data shape that other procedures can exchange.
83HashMapform HashMap {Introduces a structured data shape that other procedures can exchange.
87HashSetform HashSet {Introduces a structured data shape that other procedures can exchange.
91BinaryHeapform BinaryHeap {Introduces a structured data shape that other procedures can exchange.
95Orderingpick Ordering {Introduces a tagged variant type used to model distinct outcomes.

Procedures

LineNameSignatureRole
99collection_error_nameproc collection_error_name() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
103option_i64_noneproc option_i64_none() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
107option_i64_someproc option_i64_some() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
111option_string_noneproc option_string_none() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
115option_string_someproc option_string_some() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
119vector_newproc vector_new() -> int {Owns a concrete data shape or the operations that maintain it.
123vector_with_capacityproc vector_with_capacity() -> int {Owns a concrete data shape or the operations that maintain it.
127vector_from_arrayproc vector_from_array() -> int {Owns a concrete data shape or the operations that maintain it.
131vector_lenproc vector_len() -> int {Owns a concrete data shape or the operations that maintain it.
135vector_sizeproc vector_size() -> int {Owns a concrete data shape or the operations that maintain it.
139vector_capacityproc vector_capacity() -> int {Owns a concrete data shape or the operations that maintain it.
143vector_is_emptyproc vector_is_empty() -> int {Owns a concrete data shape or the operations that maintain it.
147vector_is_valid_indexproc vector_is_valid_index() -> int {Owns a concrete data shape or the operations that maintain it.
151vector_reserveproc vector_reserve() -> int {Owns a concrete data shape or the operations that maintain it.
155vector_pushproc vector_push() -> int {Owns a concrete data shape or the operations that maintain it.
159vector_pop_i64proc vector_pop_i64() -> int {Owns a concrete data shape or the operations that maintain it.
163vector_popproc vector_pop() -> int {Owns a concrete data shape or the operations that maintain it.
167vector_get_i64proc vector_get_i64() -> int {Owns a concrete data shape or the operations that maintain it.
171vector_at_i64proc vector_at_i64() -> int {Owns a concrete data shape or the operations that maintain it.
175vector_set_i64proc vector_set_i64() -> int {Owns a concrete data shape or the operations that maintain it.
179vector_insert_i64proc vector_insert_i64() -> int {Owns a concrete data shape or the operations that maintain it.
183vector_remove_i64proc vector_remove_i64() -> int {Owns a concrete data shape or the operations that maintain it.
187vector_clearproc vector_clear() -> int {Owns a concrete data shape or the operations that maintain it.
191vector_to_arrayproc vector_to_array() -> int {Owns a concrete data shape or the operations that maintain it.
195vector_cloneproc vector_clone() -> int {Owns a concrete data shape or the operations that maintain it.
199vector_extendproc vector_extend() -> int {Owns a concrete data shape or the operations that maintain it.
203vector_contains_i64proc vector_contains_i64() -> int {Owns a concrete data shape or the operations that maintain it.
207vector_index_of_i64proc vector_index_of_i64() -> int {Owns a concrete data shape or the operations that maintain it.
211vector_reverse_i64proc vector_reverse_i64() -> int {Owns a concrete data shape or the operations that maintain it.
215vector_sum_i64proc vector_sum_i64() -> int {Owns a concrete data shape or the operations that maintain it.
219vector_min_i64proc vector_min_i64() -> int {Owns a concrete data shape or the operations that maintain it.
223vector_max_i64proc vector_max_i64() -> int {Owns a concrete data shape or the operations that maintain it.
227vector_sort_i64proc vector_sort_i64() -> int {Owns a concrete data shape or the operations that maintain it.
231vector_binary_search_i64proc vector_binary_search_i64() -> int {Owns a concrete data shape or the operations that maintain it.
235copyproc copy() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
239list_newproc list_new() -> int {Owns a concrete data shape or the operations that maintain it.
243list_lenproc list_len() -> int {Owns a concrete data shape or the operations that maintain it.
247list_sizeproc list_size() -> int {Owns a concrete data shape or the operations that maintain it.
251list_is_emptyproc list_is_empty() -> int {Owns a concrete data shape or the operations that maintain it.
255list_push_backproc list_push_back() -> int {Owns a concrete data shape or the operations that maintain it.
259list_push_frontproc list_push_front() -> int {Owns a concrete data shape or the operations that maintain it.
263list_clearproc list_clear() -> int {Owns a concrete data shape or the operations that maintain it.
267list_to_arrayproc list_to_array() -> int {Owns a concrete data shape or the operations that maintain it.
271queue_newproc queue_new() -> int {Owns a concrete data shape or the operations that maintain it.
275queue_lenproc queue_len() -> int {Owns a concrete data shape or the operations that maintain it.
279queue_sizeproc queue_size() -> int {Owns a concrete data shape or the operations that maintain it.
283queue_is_emptyproc queue_is_empty() -> int {Owns a concrete data shape or the operations that maintain it.
287queue_is_fullproc queue_is_full() -> int {Owns a concrete data shape or the operations that maintain it.
291queue_enqueueproc queue_enqueue() -> int {Owns a concrete data shape or the operations that maintain it.
295queue_dequeue_i64proc queue_dequeue_i64() -> int {Owns a concrete data shape or the operations that maintain it.
299queue_front_i64proc queue_front_i64() -> int {Owns a concrete data shape or the operations that maintain it.
303queue_clearproc queue_clear() -> int {Owns a concrete data shape or the operations that maintain it.
307deque_newproc deque_new() -> int {Owns a concrete data shape or the operations that maintain it.
311deque_is_emptyproc deque_is_empty() -> int {Owns a concrete data shape or the operations that maintain it.
315deque_is_fullproc deque_is_full() -> int {Owns a concrete data shape or the operations that maintain it.
319deque_push_backproc deque_push_back() -> int {Owns a concrete data shape or the operations that maintain it.
323deque_push_front_i64proc deque_push_front_i64() -> int {Owns a concrete data shape or the operations that maintain it.
327deque_pop_back_i64proc deque_pop_back_i64() -> int {Owns a concrete data shape or the operations that maintain it.
331deque_pop_front_i64proc deque_pop_front_i64() -> int {Owns a concrete data shape or the operations that maintain it.
335stack_newproc stack_new() -> int {Owns a concrete data shape or the operations that maintain it.
339stack_lenproc stack_len() -> int {Owns a concrete data shape or the operations that maintain it.
343stack_sizeproc stack_size() -> int {Owns a concrete data shape or the operations that maintain it.
347stack_is_emptyproc stack_is_empty() -> int {Owns a concrete data shape or the operations that maintain it.
351stack_is_fullproc stack_is_full() -> int {Owns a concrete data shape or the operations that maintain it.
355stack_pushproc stack_push() -> int {Owns a concrete data shape or the operations that maintain it.
359stack_pop_i64proc stack_pop_i64() -> int {Owns a concrete data shape or the operations that maintain it.
363stack_peek_i64proc stack_peek_i64() -> int {Owns a concrete data shape or the operations that maintain it.
367stack_clearproc stack_clear() -> int {Owns a concrete data shape or the operations that maintain it.
371hashmap_newproc hashmap_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
375hashmap_empty_entriesproc hashmap_empty_entries() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
379hashmap_lenproc hashmap_len() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
383hashmap_sizeproc hashmap_size() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
387hashmap_is_emptyproc hashmap_is_empty() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
391hashmap_load_percentproc hashmap_load_percent() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
395hashmap_should_growproc hashmap_should_grow() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
399hash_stringproc hash_string() -> int {Implements a security-sensitive transformation in the crypto boundary.
403hashmap_find_slotproc hashmap_find_slot() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
407hashmap_containsproc hashmap_contains() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
411hashmap_insertproc hashmap_insert() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
415hashmap_removeproc hashmap_remove() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
419hashmap_clearproc hashmap_clear() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
423hashmap_rehashproc hashmap_rehash() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
427hashmap_keysproc hashmap_keys() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
431hashmap_get_i64proc hashmap_get_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
435hashmap_values_i64proc hashmap_values_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
439hashmap_items_i64proc hashmap_items_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
443hashset_newproc hashset_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
447hashset_with_capacityproc hashset_with_capacity() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
451hashset_insertproc hashset_insert() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
455hashset_removeproc hashset_remove() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
459hashset_containsproc hashset_contains() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
463hashset_sizeproc hashset_size() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
467hashset_lenproc hashset_len() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
471hashset_is_emptyproc hashset_is_empty() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
475hashset_clearproc hashset_clear() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
479hashset_valuesproc hashset_values() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
483hashset_unionproc hashset_union() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
487hashset_intersectionproc hashset_intersection() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
491hashset_differenceproc hashset_difference() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
495heap_newproc heap_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
499heap_lenproc heap_len() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
503heap_is_emptyproc heap_is_empty() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
507min_heap_i64proc min_heap_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
511max_heap_i64proc max_heap_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
515heap_should_swap_i64proc heap_should_swap_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
519heap_push_i64proc heap_push_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
523heap_peek_i64proc heap_peek_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
527range_newproc range_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
531range_lenproc range_len() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
535range_to_arrayproc range_to_array() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
539rangeproc range() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
543range2proc range2() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
547range3proc range3() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
551zipproc zip() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
555enumerateproc enumerate() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
559reversedproc reversed() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
563array_is_emptyproc array_is_empty() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
567array_first_i64proc array_first_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
571array_last_i64proc array_last_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
575array_sum_i64proc array_sum_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
579array_product_i64proc array_product_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
583array_contains_i64proc array_contains_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
587array_index_of_i64proc array_index_of_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
591array_count_i64proc array_count_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
595array_unique_i64proc array_unique_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
599array_filter_nonzero_i64proc array_filter_nonzero_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
603array_map_double_i64proc array_map_double_i64() -> int {Owns a concrete data shape or the operations that maintain it.
607array_sort_i64proc array_sort_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
611normalize_capacityproc normalize_capacity() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
615min_i32proc min_i32() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
619max_i32proc max_i32() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
623clamp_i32proc clamp_i32() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
627compare_i64proc compare_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
631zero_valueproc zero_value() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
635array_lenproc array_len() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
639array_copyproc array_copy() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
643array_getproc array_get() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
647array_setproc array_set() -> int {Owns a concrete data shape or the operations that maintain it.
651array_pushproc array_push() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
655array_takeproc array_take() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
659array_dropproc array_drop() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
663array_get_i64proc array_get_i64() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
667array_set_i64proc array_set_i64() -> int {Owns a concrete data shape or the operations that maintain it.
671array_get_stringproc array_get_string() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
675string_lenproc string_len() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
679string_char_codeproc string_char_code() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
683stdlib_smoke_6proc stdlib_smoke_6() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
687stdlib_smoke_7proc stdlib_smoke_7() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
691stdlib_smoke_8proc stdlib_smoke_8() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
695stdlib_smoke_9proc stdlib_smoke_9() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
699stdlib_smoke_10proc stdlib_smoke_10() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
703stdlib_smoke_11proc stdlib_smoke_11() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.

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.

Composition guidance

Choose this module when

  • Choose collections.vitl when the main question is owned by this module rather than by transport, storage, orchestration, or user-interface code.
  • 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.

Pause before extending it when

  • Avoid extending this file when the new helper mostly changes the boundary to host I/O, runtime coordination, or foreign integration instead of staying inside collections.
  • Check nearby modules such as collections/collections.vitl, collections/deque.vitl, collections/graph.vitl before adding convenience wrappers here.

Relationship table

This table keeps the page closer to a real encyclopedia entry: a module is easier to understand when compared with its nearest alternatives in the same family.

NeighborProceduresData surfacesWhy compare it
collections/collections.vitl320Shares the same family boundary but carries a distinct slice of responsibility.
collections/deque.vitl100Shares the same family boundary but carries a distinct slice of responsibility.
collections/graph.vitl110Shares the same family boundary but carries a distinct slice of responsibility.
collections/hashmap.vitl182Shares the same family boundary but carries a distinct slice of responsibility.
collections/hashset.vitl161Shares the same family boundary but carries a distinct slice of responsibility.
collections/linkedlist.vitl132Shares the same family boundary but carries a distinct slice of responsibility.
collections/matrix.vitl80Shares the same family boundary but carries a distinct slice of responsibility.
collections/queue.vitl201Shares the same family boundary but carries a distinct slice of responsibility.

Neighbor modules