def HASHMAP_SIZE: size = 1 << 14; type hashmap = [HASHMAP_SIZE](size, stat); fn getitem(map: *hashmap, hash: size) stat = { let i = hash & (HASHMAP_SIZE - 1); for (true) { if (map[i].0 == 0 && map[i].1.count == 0) break; if (map[i].0 == hash) return map[i].1; i = (i + 1) & (HASHMAP_SIZE - 1); }; return stat { ... }; }; fn setitem(map: *hashmap, hash: size, value: stat) void = { let i = hash & (HASHMAP_SIZE - 1); for (true) { if (map[i].0 == 0 && map[i].1.count == 0) break; if (map[i].0 == hash) { map[i].1 = value; return; }; i = (i + 1) & (HASHMAP_SIZE - 1); }; map[i] = (hash, value); };