8.10 map

This module creates a struct parameterized by the types specified in strings key and value, mapping keys to values with a specified default:

import map;

mapTemplate(name="map",key="string",value="int",default="-1");

map M;

M.add("z",2);
M.add("a",3);
M.add("d",4);
write(M.lookup("a"));
write(M.lookup("y"));