upvote
Your math explanation starts with a math concept that the vast, vast, vast majority of people will have never even heard of, even in math-adjacent fields. It's not anti-math reasoning. It's a lack of self-awareness that your background is very math heavy, which makes that particular explanation make sense to you. I've gone my entire schooling, as a student who was always one of the few who were "good at math", all the the way through my CS education, without ever having heard of a functor until I came across the Haskell monad explanation meme.

Your next step could be to blame the school systems if you want, but that doesn't help the situation at hand.

reply
>> You start from a functor which is a data type that admits a map operation. Then you add of, or pure, to make an applicative functor, and then you add flatmap to make a monad.

> Your math explanation starts with a math concept that the vast, vast, vast majority of people will have never even heard of, even in math-adjacent fields

Let me take this apart.

1. a data type that admits a map operation

Present in most languages including JavaScript. Not a mathematical issue.

2. add of, or pure, to make an applicative functor

I had to look this up. It was new content for me, maybe 5 or 10 minutes believing I would get it.

3. add flatmap

This didn’t scare me but maybe it scares others. Not a mathematical issue here, though. Being in C++ doesn’t make this concept mainstream, I guess?

https://en.cppreference.com/cpp/container/flat_map

reply
I majored in mathematics and I learned category theory before touching any serious Haskell, and I still found most of the "monad tutorials" kind of opaque and handwavy, and I think there are inherently non-trivial details unrelated to the notion of functor etc.
reply
No there are no trivial details, and you don't need a mathematics major or category theory to understand what a functor is.

It's a pair of a type constructor F(a) and a map operation a -> b to get an F(b).

The two "non-trivial" details are the fact that the map operation has to respect identity, map(id) = id, and function composition: map(g ∘ f) = map(g) ∘ map(f)

None of those concepts is any difficult, nor requires any "math major" or non-trivial details, because the are not there.

reply
When there are 100 explanations of some topic, maybe it's not so trivial, after all, even when the bare axioms seem trivial.
reply
Most of the stuff you just explained is absent from your explanation of monads. So it turns out monads are not so simple after all for people who don't already understand functors...
reply
FWIW I dropped out of high school to pursue programming more directly. I regret it now because of the job market crash, but it's also too late for me to go back.
reply
deleted
reply