This line piqued my interest - what does an algebra mean in this context? Does anyone know of any good resources for further exploration?
This line piqued my interest - what does an algebra mean in this context? Does anyone know of any good resources for further exploration?
Basically it's saying to create a formal set of types and formal rules about how they interact. If you search for permutations of phrases like "functional programming" "algebra" "data types" you'll turn up some hits. For instance [1]
[1] https://www.turingtaco.com/algebraic-data-types-structuring-...
As an easy example, you're probably quite familiar with the algebra of addition over integers. It describes rules like associativity and commutativity that describe some general transformations that are guaranteed to always behave predictably. Contrast this with subtraction over integers, which is associative but not commutative. Programs in general are neither associative nor commutative, so sadly no swapping terms or adding parenthesis willy-nilly.
A slightly more advanced example that you're probably still familiar with is mapping over Functors. A functor is just a thing that contains other things, and it includes collections you're familiar with like lists and trees. Well, the action of taking stuff out of a container, modifying it, and returning the results in their original position turns out to be an incredibly common and useful pattern!
You can also checkout the work of Conal Elliott: http://conal.net/