4 ms·
Unfortunately, his simple explanation of these concepts is just not correct. He claims functors are a container you can map on and that monads are also containe
by yummyfajitas 11y ago
Unfortunately, his simple explanation of these concepts is just not correct. He claims functors are a container you can map on and that monads are also containers.
Here's a monad (which is also an applicative functor) that isn't a container: probability. The space of probability distributions is a functor which can be mapped. In the sampling representation:
p.map(f) = new Prob {
def draw = f(p.draw)
}
It also supports flatmap:
p.flatMap(f) = new Prob {
def draw = f(p.draw).draw
}
Yet nothing is "contained". Each Prob object is just a random number variable generator.
- nandemo 11y agoRight. And function types aren't containers either. So much for "plain English".
- yummyfajitas 11y agoWe should just accept that math is a better language for some concepts and try to learn it. This idea that everything can and should be dumbed down for the innumerate is anti intellectual.