Categories in OO: Monads

, in PHP, Categories

Last time we used Maybe to encapsulate an optional value, performing operations on it while remaining ignorant of the actual presence of that value. Now we turn to the famous Monad, starting with an example that illustrates it’s purpose.

Categories in OO: Functors

, in PHP, Categories

Today I’m starting my series on categories in OO. My goal is to explain these concepts to programmers who are already familiar with object-oriented programming, but new to functional programming.