Closed samchon closed 2 years ago
export class HashMap<Key, T> { public take(key: Key, generator: () => T): T { const it = this.find(key); return it.equals(this.end()) ? this.emplace(key, generator()).first.second : it.second; } }