18: Monads

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: Pluton Tim Buckley Huge shout out to Marcus Nielsen Show Notes: bind :: m a -> (a -> m b) -> m b Example of do syntax vs using bind aka >>=: main = do foo <- doMonadyThing foo2 <- doOtherMonadyThing foo pure (whatever foo foo2) main = doMonadyThing >>= (\foo -> doOtherMonadyThing foo >>= (\foo2 -> pure (whatever foo foo2)) ) Extracting a value from a Maybe extract :: Just Int -> Int extract foo = case foo of Just num -> num Nothing -> 0 Railroad oriented programming talk by Scott Wlaschin fsharpforfunandprofit.com/rop/ FP Chat Slack Community: https://fpchat-invite.herokuapp.com

Om Podcasten

LambdaCast is a podcast about functional programming for working developers. Our focus is to describe concepts using clear everyday language without watering anything down. If you've ever been curious about FP but were turned off by the jargon or unfamiliar concepts, this is the place to be. Thoughts, comments, critique? Send them to contact@lambdacast.com Music is "Lively Lumpsucker" by Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 License Icon is a modification of "Communicator" by Juan Pablo Bravo (https://thenounproject.com/term/communicator/47500/) Licensed under Creative Commons: By Attribution 3.0 License