Endomorphisms of an object in a category. Arguments order in multiplication agrees with function.comp, not with category.comp.
Multiplication of endomorphisms agrees with function.comp, not category_struct.comp.
Endomorphisms of an object form a monoid
In a groupoid, endomorphisms form a group
f.map as a monoid hom between endomorphism monoids.
f.map_iso as a group hom between automorphism groups.