Idea Of Ends On nLab What does the nLab article on ends means exactly with left and right action?



The only way I could make sense of this is that, if $D=\text{Set}$, we have for each morphism $f:c\to c'$ the maps $\{L_f,R_f\}:\prod_{c\in C}F(c,c)\to F(c,c')$ with $L_f:=F(1,f)\circ\pi_c$ and $R_f:=F(f,1)\circ\pi_{c'}$ and the end picks now the subobject of $\prod_{c\in C}F(c,c)$ where those maps coincide.
But I always thought an action would be something mapping back into the object itself, is that not the case?
 A: It might help to understand how group actions (and many other kinds of actions) can be generalized in a categorical setting. First, every group $G$ can be considered as a special kind of category. This category, often notated $\mathbf{B} G$ consists of a single object $\bullet$ and $\hom(\bullet, \bullet)$ is defined to be $G$. The identity for $\bullet$ is the identity in $G$ and composition is the binary operation in $G$. The unit laws and associativity follow from the corresponding facts in $G$.
There are some interesting facts about this construction (for example, Cauchy's embedding theorem for groups is just the Yoneda lemma), but the construction we're interested in is the action of a group. A (left) group action of $G$ is simply a functor $\mathbf{B} G \to Set$. You can check the details, but the gist of it is this: a functor $F: \mathbf{B} G \to Set$ maps $\bullet$ to some set $X$ and for each morphism $g$ in $\mathbf{B} G$ (that is, for each element of $G$), we get a map $F(g): X \to X$. This can be unpacked into a set $X$ and a function $\cdot: G \times X \to X$ (written as infix like $g \cdot x$). Functorality is precisely what's needed to say that $e \cdot x = x$ (because $F(e) = id_X$) and $g \cdot (h \cdot x) = gh \cdot x$ (because $F(g) \circ F(h) = F(gh)$).
This suggests an immediate generalization. An action of a category $C$ on $Set$ is a functor $C \to Set$. Now the action isn't restrained to acting on a single set, but might have a different set for every object in $C$. We could even go so far as to say that an action of a category $C$ on a category $D$ is simply a functor $C \to D$. In this context, the "actions" induced by a functor $F$ are simply the maps $F(f): F(c) \to F(c')$ induced by maps $f: c \to c'$ in $C$. Notice how this corresponds to the actions $g \cdot -: X \to X$ in the case of groups.
A right action can also be described like this via a functor $\mathbf{B} G^{op} \to Set$. More generally, you could even talk about both at once with a functor $\mathbf{B} G^{op} \times \mathbf{B} G \to Set$. Now this is a set with both a right action and a left action on that set. We could even have different groups for the left and right actions with $\mathbf{B} H^{op} \times \mathbf{B} G \to Set$. Generalizing everything, we could consider a left/right action to be a functor $D^{op} \times C \to E$. The left actions of such a functor $F$ are the maps $F(1, f): F(d, c) \to F(d, c')$ for morphishms $f: c \to c'$ in $C$. The right actions are the maps $F(g, 1): F(d', c) \to F(d, c)$ for morphishms $g: d \to d'$ in $D$.
