Wip/hmap singletons

Adds:

* a test which uses a polymorphic function over record fields
* a new function 'updateWith' which can change the type and value of an existing record field