| DICT(2) | System Calls Manual | DICT(2) |
dict - list of string pairs
include "dict.m";
dict := load Dictionary Dictionary->PATH;
Dict: adt {
add: fn(d: self ref Dict, e: (string, string));
delete: fn(d: self ref Dict, k: string);
lookup: fn(d: self ref Dict, k: string): string;
keys: fn(d: self ref Dict): list of string;
};
Dict provides a simple string to string association list:
/appl/lib/dict.b
No attempt is made to keep keys unique in the list; if more than one pair exists with the same key, then lookup will select one of them arbitrarily.
Computational overhead of lookup and deletion of keys is proportional to the number of pairs in the list.