Live data from Hacker News

The Monad Challenges: Jump start your understanding of monads

mightybyte.github.io

1–10 of 51 posts

Re: The Monad Challenges: Jump start your understanding of monads

#3

Cool tutorials. I think it's much more effective to start with learning functors and applicatives before monads. I'm surprised at the number of tutorials aimed at teaching people monads who don't yet understand the more basic type classes.

Coming at this from a mathematician's perspective, it's complete madness to learn what a monad is before learning what a natural transformation (and therefore a functor) is. I would also consider it somewhat eccentric to do monads without learning what an adjunction is, since adjunctions are basically why we're interested in monads in the first place.

Re: The Monad Challenges: Jump start your understanding of monads

#4
post #3

Cool tutorials. I think it's much more effective to start with learning functors and applicatives before monads. I'm surprised at the number of tutorials aimed at teaching people monads who don't yet understand the more basic type classes.

Coming at this from a mathematician's perspective, it's complete madness to learn what a monad is before learning what a natural transformation (and therefore a functor) is. I would also consider it somewhat eccentric to do monads without learning what an adjunction is, since adjunctions are basically why we're interested in monads in the first place.

Adjunctions aren't highly relevant to programming. Monads in programming have much less category theory than monads in math.

Re: The Monad Challenges: Jump start your understanding of monads

#6
post #4
post #3

Earlier quoted context omitted.

Coming at this from a mathematician's perspective, it's complete madness to learn what a monad is before learning what a natural transformation (and therefore a functor) is. I would also consider it somewhat eccentric to do monads without learning what an adjunction is, since adjunctions are basically why we're interested in monads in the first place.

Adjunctions aren't highly relevant to programming. Monads in programming have much less category theory than monads in math.

The significance of monads in programming is entirely because of the adjunction between the category of types and "pure" functions and the category of types and "monadic" functions (i.e., the Kleisli category of the monad). A monad is used to encode the latter in terms of the former via the Kleisli adjunction (whereby monadic maps from FX to FY correspond to pure maps from X to GFY, with the monad GF thus arising from an adjunction F -| G [where F can be taken to be identity on objects in the case of interest]).

Re: The Monad Challenges: Jump start your understanding of monads

#7
I found a math background is a disadvantage for learning Haskell, since most mathematicians don't really use a lot of category theory. Lately that is changing, http://math.stackexchange.com/questions/1617592/is-set-prime... There's a lot of confusion on how the math version of "functor" or "monad" maps to the CS definitions.

I found this tutorial on Monads and Applicatives helpful http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...

Re: The Monad Challenges: Jump start your understanding of monads

#9
post #7

I found a math background is a disadvantage for learning Haskell, since most mathematicians don't really use a lot of category theory. Lately that is changing, http://math.stackexchange.com/questions/1617592/is-set-prime... There's a lot of confusion on how the math version of "functor" or "monad" maps to the CS definitions. I found this tutorial on Monads and Applicatives helpful http://adit.io/posts/2013-04-17-func…

Something that doesn't help the Math->CS understanding of Functors is, for example, that languages like C++ use "Functor" to mean other things (function pointer in this case).

Re: The Monad Challenges: Jump start your understanding of monads

#10

Cool tutorials. I think it's much more effective to start with learning functors and applicatives before monads. I'm surprised at the number of tutorials aimed at teaching people monads who don't yet understand the more basic type classes.

I've wondered that myself. I think the reason might be monads are used to represent IO computations and state mutation so people are interested in jumping straight into that. Honestly I use functor as much/more than I use monad in my day-to-day code which supports your statement here.
Post reply on HN