Remix.run Logo
▲ fn-mote 3 hours ago

>> 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