sublist or a subtree. In the latter case, it is the whole data-structure but with the focus moved to the given position.

We show that directed containers are no less neat than containers. While containers denote set functors via a fully-faithful functor, directed containers interpret fully-faithfully into comonads. They admit some of the constructions that containers do, but not others: for instance, two directed containers cannot be composed in general. Our main result is that every comonad whose underlying functor is the interpretation of a container is the interpretation of a directed container. So the answer to the question in the title of this paper is: a container is a comonad exactly when it is a directed container. In more precise terms, the category of directed containers is the pullback of the forgetful functor from the category of comonads to that of set functors along the interpretation functor of containers. This also means that a directed container is the same as a comonoid in the category of containers.

In the core of the paper, we study directed containers on ${\mathbf{Set}}$. Toward the end of the paper we point it out that the development could also be carried out more generally 