I'm reading about spans in Category theory, which denote categories with finite colimits whose morphisms are equivalence classes of diagrams "A <- X -> B". There's also their categorical dual, cospans, with the arrows reversed.
Is there a construction where arrows would form a sequence A -> B -> A?
Composition of Hom(A, B) (elements are A -> B -> A) and Hom(B, C) (elements are B -> C -> B) would then yield a an element of Hom(A, C) which is a diagram A -> B -> C -> B -> A.
It seems this is a category (associativity and identity hold), but I'm not sure has it been discussed in the literature somewhere.
I'm not even sure how to search for something like this.