[Haskell-cafe] Intuition to understand ...
chriswarbo at googlemail.com
Thu Jul 31 13:17:54 UTC 2014
martin <martin.drautzburg at web.de> writes:
> > x >>= f = join (fmap f x)
> So you're really throwing symbols around?
> When I do math, I do similar things. Particularly in algebra I don't ask myself what e.g. a cubic root does, because I
> know the laws of roots and I know what I can do with the symbols.
Not quite. Cube roots are a special case of roots. Here, I'm building
bind out of two conceptually-simpler parts. Of course, it's subjective
which is "simpler", but in any case we'll need to define fmap sooner or
later, since all Monads must be Functors; we might as well use it!
> In math, the only ways I know of to get a better intuition is practice
> and a good teacher. Maybe it is the same in haskell?
Practice definitely helps. I've managed so far without a teacher
(does stackoverlow.com count as a teacher? ;) )
More information about the Haskell-Cafe