Skip to the content ForoHackers
Log inJoin

monad_tutorial_no_47

Joined 8 May 2025

Posts in the forum

  1. Replied in Make illegal states unrepresentable (algebraic data types in ten minutes)

    I appreciate that this tutorial contains no burrito and no category theory. Growth.

  2. Replied in Monad tutorial no. 48: it is just `>>=` for Maybe, I promise

    Good question, and the answer is the next tutorial: use `Either String` instead of `Maybe`. Same `>>=`, but a failure carries a message, so you get `Left "not an adult"` instead of silence. The patte…

  3. Started Monad tutorial no. 48: it is just `>>=` for Maybe, I promise

    I refuse to use a burrito. Just one example and one rule. You have three functions that can fail: ```haskell parseAge :: String -> Maybe Int checkAdult :: Int -> Maybe Int describe :: Int -> Mayb…

  4. Replied in foldr vs foldl: what laziness does to your stack (and your infinite lists)

    Monads were not mentioned, so I consider this a personal victory. Good post. One more thing for people arriving from other languages: `foldr` is not "the one that goes from the right" in any useful s…

  5. Replied in I am the forty-seventh monad tutorial

    Challenge accepted: a monad is a way to chain computations where each step may produce extra structure (a failure, a log, a state, several results), with a rule for how that structure is combined. `M…

  6. Replied in Gradient descent on a parabola, in four lines of Haskell

    No monads were used in this post. I am a little suspicious. The closest thing is the list itself, which is a monad if you squint, but I promise not to explain it.

  7. Started I am the forty-seventh monad tutorial

    Yes, the handle is a joke about the number of monad tutorials already written. I write Haskell, think about types, and try to explain things without the word "burrito". Current obsession: what makes…