loading...

re: Don't Read This Monad Tutorial VIEW POST

TOP OF THREAD FULL DISCUSSION
re: This looks really ugly to me, transducers allow me to write code like $operations = compose( filter('is_odd'), map('+') ); to_array([1, 2, 3...
 

Transducers use function composition to achieve the desired result which is great. The problem that I walk through solving in this example is that I not only want the final result, but also the functions that were called to create that result. It's a weird problem, but it's a problem that could corner someone into creating a monad by accident.

As far as missing anything important goes, you probably already use monads all the time and really don't need to know that they're categorized as Monads in order to use them effectively; Lists are monads. But there is a whole other way of looking at programs from the perspective of category theory, and Monads are a great entry point into seeing things from that perspective.

code of conduct - report abuse