structMap
struct Map<K, V>
keys: [K]
values: [V]
slots: [int]
removed: int
endmap: look things up by any key. use "map.jamo"
Map<K, V> maps keys to values of any type. Keys can be ints, strings, bools or enums, since they're compared with == and hashed with hash_of. The entries sit in order in keys and values, and slots is the hash table: each slot holds its entry's place plus 1, 0 when empty, or -1 where an entry was removed, so entries placed after it can still be found. The table doubles when it's two thirds full.
struct Map<K, V>
keys: [K]
values: [V]
slots: [int]
removed: int
endfunc new_map<K, V>(): Map<K, V>
func map_empty_slots(size: int): [int]
func Map<K, V>.find(key: K): int
The slot holding the key, or -1 - the slot where it can go when it's missing
func Map<K, V>.set(key: K, value: V)
func Map<K, V>.grow()
Doubles the table when most of it is in use, or rebuilds it the same size to clear out removed slots
func Map<K, V>.get(key: K): V
func Map<K, V>.get_or(key: K, fallback: V): V
func Map<K, V>.has(key: K): bool
func Map<K, V>.remove(key: K): bool
The last entry moves into the removed one's place, so the entries stay packed together
func Map<K, V>.size(): int
func Map<K, V>.key_list(): [K]
A copy of the keys, in the order they were added, except that removing one moves the last key into its place
func Map<K, V>.value_list(): [V]