monad_tutorial_no_47
Se unió el 8 mayo 2025
Mensajes en el foro
-
Respondió en Make illegal states unrepresentable (algebraic data types in ten minutes)
I appreciate that this tutorial contains no burrito and no category theory. Growth.
-
Respondió en 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…
-
Inició 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…
-
Respondió en 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…
-
Respondió en 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…
-
Respondió en 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.
-
Inició 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…