
Learning Functional Programming in Go
By :

A morphism is an arrow from one object (A, B, C in our example) in a category (our grouping of A, B, C). There can be more than one arrow from A to B (or from B to C, or A to C). Also, arrows can go from any object to itself; this is called the identity morphism.
Let's look at at a couple things we can do with morphisms. W can compose them and run the identity morphism to verify an object's identity.
Below, is our basic composition operation.
The composition operation is g o f, g after f applies arg x (from A) to give us g applied to f applied to x: (g o f)(x) = g(f(x)).
If f(g(x)) = g(f(x)) for all x, then we can say that f and g commute under composition.
However, that's not typical. Function composition is generally not commutative.
Let's take an example. Remember...