public function get($id)
    {
        if ($id instanceof \Closure) {
            return $id($this);
        }

        if (!$this->has($id)) {
            $service = $this->factory->create($id, $this);
            $this->repository->set($id, $service);
        }

        return $this->repository->get($id);
    }