map objects can be initialized with a function