public function service($name)
    {
        if (isset($this->resolved[$name])) {
            return $this->resolved[$name];
        }

        $service = $this->resolver->resolve($name);
        $serviceArgs = $this->resolveFuncArgs($service);

        return $this->resolved[$name] = $service->invoke($serviceArgs);
    }