First, some background: recently in learning more about functional programming I saw one use for coproducts that surprised me a little bit: A function $f: A \rightarrow B \coprod C$ may result when considering a computation that starts with an $a \in A$ and results with an element of $B$ unless "something exceptional happens" in which case it results in an element in $C$ that describes / paramaterizes some sort of 


* computational defect
* failure mode
* deformity
* irregularity .


This was surprising because before that point I had considered the two sides of a coproduct to be reversible, but they can no longer be considered so if the first set is designated as the collection of "normal" outputs and the second set is designated as paramaterizing an "exceptional" result.


My question: are there other places where an function/arrow to a coproduct is viewed as an alternative between a normal/regular outcome on one side and an exceptional/irregular outcome on the other? Though I can't think of many right now, I'm guessing there must be computations (etc) where coproducts have an asymmetric normal vs irregular interpretation.



Coproducts and "Error Conditions" in Math vs CS
This interpretation of $C$ as a place to report failures doesn't really have teeth until you see how it interacts with function composition, which is the following. Suppose $f : X \to Y \coprod C$ and $g : Y \to Z \coprod C$ are two "functions with $C$-valued failures." Then I claim that there is a meaningful way to compose them to get a function $g \circ\_C f : X \to Z \coprod C$, as follows: take the composite


$$X \xrightarrow{f} Y \coprod C \xrightarrow{g \text{ or } i\_C} Z \coprod C$$


where $g \text{ or } i\_C$ is my awkward notation for the function $Y \coprod C \to Z \coprod C$ which on $Y$ is $g$ and on $C$ is the inclusion map $i\_C : C \to Z \coprod C$. In particular, the definition of this notion of composition treats $C$ differently from every other object that occurs. This is what breaks the symmetry between $C$ and the other term in the coproduct. 


Intuitively, this notion of composition reports the first failure in a sequence of computations, then stops. 


This is a special case of [Kleisli composition](https://en.wikipedia.org/wiki/Kleisli_category) with respect to a [monad](https://en.wikipedia.org/wiki/Monad_(functional_programming)), which in this case is $T(-) = (-) \coprod C$. I believe in computer science this is called the [Error monad](https://hackage.haskell.org/package/mtl-2.2.1/docs/Control-Monad-Error.html). It generalizes the [Maybe monad](https://en.wikipedia.org/wiki/Monad_(functional_programming)#The_Maybe_monad). 


