Transitivity is the property of a relation: $R_{ab}\land R_{bc} \to R_{ac}$. Compositionality is an operation on functions: $\circ : (A\to B) \times (B \to C) \to (A \to C)$.
Intuitively, these are very similar. (In fact, the product $\times$ in the category of propositional logic is equal to $\land$, and functions are a subclass of relations).
Is there a deeper connection between these two concepts?