I could swear I remember a result of the following form:

Suppose we have a pair of functors $$C\xrightarrow{F}D\xrightarrow{G} X,$$ with $X$ cocomplete.

then we obtain a functor $$D\to X$$ sending $$d\mapsto \operatorname{colim}_{(F\downarrow d)}(G\circ \pi_d)$$ where $\pi_d:(F\downarrow d)\to D$ is the projection functor sending $(F(c)\to d) \mapsto F(c)$.

Then there is a canonical isomorphism $$\operatorname{colim}_D\left (\operatorname{colim}_{(F\downarrow d)}(G\circ \pi_d)\right) \cong \operatorname{colim}_C (G\circ F).$$

Is this true? Do you know of a source? Is there a name for this kind of result?

1more comment