Code implementing FMap, an immutable abstract data type whose values represent finite functions from keys to values.