Skip to content

collections

collections

The current repository does not ship collections.hashmap, collections.hashset, collections.heap, collections.deque, collections.stack, or collections.queue as Thagore stdlib modules.

Current status

ModuleStatus
collections.hashmapnot present
collections.hashsetnot present
collections.heapnot present
collections.dequenot present
collections.stacknot present
collections.queuenot present

What exists today

The closest available patterns are:

FeatureUse
structsfixed record-like grouping
runtime arrayssequential data supplied by runtime APIs
explicit loopsmanual traversal, aggregation, and filtering

Examples

struct Pair:
left: i32
right: i32
func pair_sum(pair: Pair) -> i32:
return pair.left + pair.right
func count_positive(items: Array[i32]) -> i32:
let total: i32 = 0
for item in items:
if (item > 0):
total = total + 1
return total
func contains_zero(items: Array[i32]) -> bool:
for item in items:
if (item == 0):
return true
return false