17: Applicative Functors

Building on the power of functors we examine a few scenarios where a normal Functor is problematic. Fortunately, there is a closely related structure known as an Applicative Functor that can provide the capabilities to solve a broader range of problems. Episode 17 patrons: Chad Wooley David Keathley Andre Carvalho Show Notes: Coconut programming language: http://coconut-lang.org/ Hack nights instead of presentations: http://tech.noredink.com/post/142283641812/designing-meetups-to-build-better-communities class Functor f => Applicative f where pure :: Applicative f => a -> f a ap :: Applicative f => f (a -> b) -> f a -> f b Example of applicative usage: pure (+) <*> Just 3 <*> Just 2 -- this results in Just 5 (+) <$> Just 3 <*> Just 2 -- this is the same as above liftA2 (+) (Just 3) (Just 2) -- alternate form using lift instead of infix operators

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 [email protected] 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