Haskell


Making your brain tingle: Explaining Monads

My attempt at explaining monads It is an unwritten law, that everybody learning Haskell sooner or later has to write a tutorial or explanation of the topic of monads. (The fourth monad law.)1 So here is my attempt at explaining monads, I will try to give an intuition on what monads are from the practical view of a developer. I’m going to use examples in Haskell, so yes, this time I’m going to assume, some basic knowledge of Haskell – but a seasoned developer might still be able to figure out the essence of the examples without learning Haskell.

Making your brain tingle: Functions as functors

Making your brain tingle I love the feeling you get, when during learning new concepts suddenly everything starts to fall into place and ideas which seemed hard to grasp become intuitive. I’d like to describe the feeling of such moments as “tingling of the brain”. One area which makes my brain tingle on a regular basis is the combination of Haskell and category theory. The topic of this blog post is one simple example: I’m going to show a way of thinking of functions as functors which, at least to me, makes it intuitive.