a simple Map implementation (Ex 8.5.2)