public function register(array $definitions): self
    {
        foreach ($definitions as $name => $callback) {
            if (!is_callable($callback)) {
                throw new \InvalidArgumentException('Values passed to register must be callable');
            }
            $this->definitions[$name] = $callback;
        }
        return $this;
    }