public function extend(string $key, Closure $callable)
    {
        if (!isset($this->stack[$key])) {
            throw new InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $key));
        }

        if (!$callable instanceof Closure) {
            throw new InvalidArgumentException(
                sprintf('Identifier "%s" is not Closure Object.', $callable)
            );
        }

        $binding = $this->offsetExists($key) ? $this->stack[$key] : null;

        $extended = function () use ($callable, $binding) {
            if (!is_object($binding)) {
                throw new ContainerException(sprintf('"%s" must be Closure object.', $binding));
            }

            return $callable($binding($this), $this);
        };

        return $this[$key] = $extended;
    }