Stored in 64-bit packed slots (Float, Int, Addr, or arena pointers to records/strings/containers)
12.3.2 Map operations and runtime characteristics
Operation
Syntax
Result Type
Semantics
Empty construction
m = Dict()
K ^ V
Initial capacity 8 slots
Literal construction
m = ("k1" ^= 10, "k2" ^= 20)
K ^ V
Infers K ^ V from key ^= value pairs
Insert / overwrite
m ^ k = val
()
Inserts (k, val) or overwrites existing k in place without rehashing
Fallible lookup
m ^ k
< V | Error >
Returns <+ val -> if present, else <- Error(...) +>
Membership check
m ^? k
<>
Returns <+> if k is present, <-> if absent
Delete entry
m ^- k
<>
Marks slot as tombstone (2) and returns <+> if removed, <-> if absent
Active count
?m
Int
Number of live occupied entries (excludes tombstones)
Snapshot iteration
m @ val, key => body m @ body
()
Captures snapshot of (keys, vals, states) at loop entry; concurrent m ^ k = v or m ^- k mutations never invalidate or desynchronize the active traversal. Note: binder order is value first (_), key second (_i)
Load factor & resize
Automatic at 75% occupancy
—
When (count + tombs + 1) * 4 > cap * 3: doubles capacity if count > cap / 2, otherwise rebuilds in place at same capacity to purge tombstones