
Category Theory is one of the most abstract branches of mathematics. It is usually taught to graduate students after they have mastered several other branches of mathematics, like algebra, topology, and group theory. It might therefore come as a shock that the basic concepts of category theory can be explained in relatively simple terms to anybody with some experience in programming.That's because, just like programming, category theory is about structure. Mathematicians discover structure in mathematical theories, programmers discover structure in computer programs. Well structured programs are easier to understand and maintain, and are less likely to contain bugs. Category theory provides the language to talk about structure, and learning it will make you a better programmer.
There are several versions with code examples in Haskell, OCaml, ReasonML, and Scala. These are all typically associated with functional programming and category theory. However, category theory is a much wider and deeper subject than any specific language, and deals with mathematical objects and concepts relevant to (more or less) all of programming.
It is really an interesting set of ideas and as soon as you start using it, some things start to change in how you approach problems. Just today in fact I was working on something and thought to myself "I need the opposite of a forgetful functor - I wonder what that is?" (turns out it's the "free group functor"). But because I knew about the existence of the concept it helped turn what would otherwise have been a maths problem that I would have really struggled with into something that was conceptually easy for me to deal with. I essentially could use the category theory to turn a problem that was hard to think about into something easy to think about (and also to show that this was valid) and then I could solve the problem in a conventional way.
[1] https://www.youtube.com/watch?v=I8LbkfSSR58&list=PLbgaMIhjbm...
[2] https://www.cambridge.org/highereducation/books/conceptual-m...
[3] As opposed to say Emily Riehl's "Category Theory in Context" https://math.jhu.edu/~eriehl/161/context.pdf where the maths required to even get started with the examples in the intro is graduate level. To get a sense, this is literally the first sentence of the first chapter: "A group extension of an abelian group H by an abelian group G consists of a group E together with an inclusion of G ↪→ E as a normal subgroup and a surjective homomorphism E ->> H that displays H as the quotient group E/G. " It's pretty full on.
I am suggesting this since you said you want to better understand functional programming. Category Theory, as mathematicians look at it, is an extremely abstract field. If you want to do pure math related stuff in Category Theory, and only then, I would say important prereqs are Abstract Algebra and Topology. I believe the motivation for Category theory lies in Algebraic Geometry and Algebraic Topology, but you definitely don't need to be an expert on these to learn it.
[0]: https://github.com/hmemcpy/milewski-ctfp-pdf
[1]: https://aphyr.com/posts/342-typing-the-technical-interview
[1] http://brendanfong.com/programmingcats.html
[2] https://bartoszmilewski.com/2014/10/28/category-theory-for-p...
[3] https://www.youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI...
All Things Considered - G. K. Chesterton
Some others I daren't mention.
Category Theory for Programmers - Bartosz Milewski
The Design of Relational Databases - Heikki Mannila, Kari-Jouko Raiha