logoalt Hacker News

preommrtoday at 8:05 AM1 replyview on HN

To explain like two fundamental rules (we can make wrapper types, and do flatmap) I will:

- Write 5 paragraphs setting up an imaginary scenario involving fantasy elements of aliens, dragons, and a magical kindom where they speak using message boxes

- Introduce basic category theory by starting with what a functor is

- Explain all the effects of a monad in such general terms that it basically amounts to anything and everything - since a function can be anything and do everything and it's just function composition

- Write some snippets of Haskell, and just assume that you're familiar with the syntax

- Talk about how delicious burritos are


Replies

alpertoday at 10:08 AM

I've read more than my fair share of these tutorials, and I'd like to be proven wrong here but I don't think I've ever seen one that explains what the point of these functional constructs (similarly with Applicative etc.) is.

"You can do IO now." So what? I could do IO before that as well.

Very rarely are practical explanations discussed. Even if they are discussed, the treatment is shallow and useless.

show 4 replies