export function getOrSet<K, V>(map: Map<K, V>, key: K, value: V): V {
if (result === undefined) {
result = value;
map.set(key, result);
}
return result;
}
export function mapToString<K, V>(map: Map<K, V>): string {