O TYM ODCINKU
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
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
Język angielski
Stany Zjednoczone
TRANSKRYPCJA 🔗
Are you the producer of this podcast?
Add a podcast transcript
Need Audio-to-Text?
Transcribe with Listen411 in Just 60 Seconds
WYSZUKAJ MINIONE ODCINKI
Wyszukaj minione odcinki LambdaCast.
INNE ODCINKI W TYM PODCASCIE
To write a program is to deal with uncertainty. Sometimes it feels like there's nothing we can count on and null (or undefined) is as pervasive as any other construct in our languages. However this does not have to be! LambdaCast dives into the thorny problem of null, and more broadly the potential…
Oh category theory, bastion of strange and wonderful terminology, (some might say terrible and inaccessible). Love it or hate it, you're likely to run into some terms from category theory if you spend enough time in FP land. In this episode we'll tackle some of the terms that make up the 'ism famil…
Partial application and currying are a feature that is often mysterious to the uninitiated. Why do functional programmers care about such a seemingly useless thing? Partial application is an important part of the "FP toolkit" and we'll why and provide use cases for the importance of having partial …
Algebraic Data Types (ADTs) are one of the most distinguishing features of statically typed functional languages. Come learn why they exist, how you can use them, and how they change your design.
Join the FP community at http://fpchat.com
Support us on Patreon at http://www.patreon.com/lambdacast…
Abstraction takes on a different meaning amongst functional programmers. This episode we dig into how parametric polymorphism is an essential tool in developing well behaved abstractions that transcend simply being a solution to your individual problem.
John Degoes polymorphism post
http://degoes.…
Zastrzeżenie: Podcast i grafika osadzone na tej stronie pochodzą z LambdaCast, który jest własnością jego właściciela i nie jest powiązany ani wspierany przez Listen Notes, Inc.
EDYTUJ
Dziękujemy za pomoc w aktualizowaniu podcastowej bazy danych.