Artwork

Content provided by LambdaCast. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by LambdaCast or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

17: Applicative Functors

58:44
 
Share
 

Manage episode 185655171 series 1044356
Content provided by LambdaCast. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by LambdaCast or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
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
  continue reading

22 episodes

Artwork

17: Applicative Functors

LambdaCast

283 subscribers

published

iconShare
 
Manage episode 185655171 series 1044356
Content provided by LambdaCast. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by LambdaCast or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
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
  continue reading

22 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide