public function transform(callable $transformer, callable $creator = null, callable $finisher = null)
    {
        // create the initial object, using as needed the default creator function
        if (null === $creator) {
            $creator = function (Map $original) { return new Map(); };
        }
        $initial = $creator($this);

        // transform the initial value using the transformer
        $this->walk(function ($value, $key) use ($transformer, &$initial) {
            $transformer($initial, $value, $key);
        });

        // finish up
        if (null === $finisher) {
            return $initial;
        } else {
            return $finisher($initial);
        }
    }