Podchaser Logo
Home
18: Monads

18: Monads

Released Friday, 17th November 2017
Good episode? Give it some love!
18: Monads

18: Monads

18: Monads

18: Monads

Friday, 17th November 2017
Good episode? Give it some love!
Rate Episode

Monads, the promised land of functional programming. Or at least with all the hype they'd better be! Come join the cast as we demystify this overhyped structure that has become an indispensable part of many functional programmer's toolkits.

Episode 18 patrons:PlutonTim BuckleyHuge shout out to Marcus Nielsen

Show Notes:bind :: m a -> (a -> m b) -> m b

Example of do syntax vs using bind aka >>=:main = dofoo <- doMonadyThingfoo2 <- doOtherMonadyThing foopure (whatever foo foo2)

main = doMonadyThing>>= (\foo -> doOtherMonadyThing foo >>= (\foo2 -> pure (whatever foo foo2)))

Extracting a value from a Maybe

extract :: Just Int -> Intextract foo = case foo ofJust num -> numNothing -> 0

Railroad oriented programming talk by Scott Wlaschinfsharpforfunandprofit.com/rop/

FP Chat Slack Community: https://fpchat-invite.herokuapp.com

Show More

Unlock more with Podchaser Pro

  • Audience Insights
  • Contact Information
  • Demographics
  • Charts
  • Sponsor History
  • and More!
Pro Features