> The hardest part about getting a good system working is identifying the appropriate abstractions and interfaces -- the definitions. Once that's worked out, the actual coding of implementations can be a rather straightforward matter, which follows a path that manifestly follows from the abstract requirements. And in the best of cases, such as occurs with pure functional programming, the implementation consists of nothing more than the writing down of the definitions.

So... I really don't think it's this easy.

In textbook category theory, definitions are given in terms of sets. However, in Haskell you do not have sets. The central category everyone works with in Haskell is `(->)`. In addition, discussion centers around _endofunctors_ in this category. Moving between textbook category theory and Haskell takes some getting used to.

Here's an example: in regular category theory. Consider the _covariant_ hom-functor \\(Hom(A, -) : \mathcal{C} \to \mathbf{Set}\\). Let's call this functor \\(h^A\\) for short (following [wikipedia's convention](https://en.wikipedia.org/wiki/Yoneda_lemma#Formal_statement)). The functor \\(h^A\\) is defined by its action on objects and morphisms in \\(\mathcal{C}\\):

- An object \\(X\\) is mapped to the set of morphisms \\(Hom(A, X)\\)
- A morphism \\(f : X \to Y\\) is mapped to \\(h^A(f) : Hom(A,X) \to Hom(A,Y)\\) where \\(h^A(f)(g) = f \circ g\\)

The Yoneda lemma states that \\(Nat(h^A, F) \cong F A\\). That is, the set of [natural transformations](https://en.wikipedia.org/wiki/Natural_transformation) from \\(h^A\\) to \\(F\\) is isomorphic to the objects in \\(F\\).

We can translate the Yoneda lemma into Haskell. But we have to drop all of this discussions of sets, and rethink a bit what are natural transformations. I can post a bit later on this if you are interested.

[EDIT: Fixing links]