?Write functions for processing a “semimap” – a combination

Write functions for processing a “semimap” – a combination of a map and a set. A semimap is a polymorphic list of two possible items: (key,value) pairs or singleton keys. The types of the keys and values are independent. You can model this with a key-value pair where the value is an option (SOME or NONE). Keys must be unique (enforce this). The storage order of elements in a semimap is not important. (Note: to have two polymorphic type variables in a data type, put those variables in a tuple