LambdaCast podcast

16: Functors

0:00
1:06:08
Rewind 15 seconds
Fast Forward 15 seconds
Going deeper down the category theory rabbit hole, we explore one of the most common and useful abstractions in the functional programming world. You're likely already familiar with Functors but just didn't know it yet. Episode 16 patrons: Chris Krycho Tyler Harper George Webster Show Notes: Functor map :: (a -> b) -> f a -> f b Bifunctor bimap :: (a -> b) -> (c -> d) -> f a c -> f b d Profunctor dimap :: (a -> b) -> (c -> d) -> f b c -> f a d Phil Freeman's talk on Profunctors: https://www.youtube.com/watch?v=OJtGECfksds

More episodes from "LambdaCast"

  • LambdaCast podcast

    22: Structuring Data

    44:23

    This time we discuss the way data tends to be structured in functional languages and some of the similarities with databases and REST. Episode 22 patrons: Jason Sooter Jamie Rolfs Christian Hamburger Daniel Svensson Di Wen Iulian Bojinca Jonathan Fishbein Nathan Sculli Nels Wadycki Paul Naranja Peter Tillemans Thomas Varney Tyler Harper weila wei Dawn (שחר) Show Notes: CPPCast: http://cppcast.com/ John Soo - Sharing in Haskell https://wiki.haskell.org/Sharing https://stackoverflow.com/questions/1105765/generating-fibonacci-numbers-in-haskell Alejandro’s link to Phantom Types article: https://www.objc.io/blog/2014/12/29/functional-snippet-13-phantom-types/ FP Chat Slack Community: https://fpchat-invite.herokuapp.com Intro/Outro music is "Lively Lumpsucker" by Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 License
  • LambdaCast podcast

    21: Type Parameters

    1:14:41

    You may have seen generics in C#, Java, or Swift but there are a lot of very useful patterns using generics that rarely get used in an OO context. In this episode, we explore Type Parameters (aka generics) from a functional perspective and how using them can improve the structure of your applications. Episode 21 patrons: Scott Smith Joel McCracken Hakon Rossebo Seth Utecht Christophe Pereira da Conceicao E. Mulder Show Notes: Add a type parameter video: https://www.youtube.com/watch?v=BHjIl81HgfE Matt Parson's follow-up post: http://www.parsonsmatt.org/2017/04/08/maybe_use_a_type_parameter.html Stephen’s Twitter: https://twitter.com/S11001001 Type Parameter example in Scala: https://typelevel.org/blog/2015/09/21/change-values.html FP Chat Slack Community: https://fpchat-invite.herokuapp.com
  • LambdaCast podcast

    Don't miss an episode of LambdaCast and subscribe to it in the GetPodcast app.

    iOS buttonAndroid button
  • LambdaCast podcast

    20: Laziness

    57:19

    Lazy evaluation is not normally something you hear programmers discussing but there is a lot of power available if you know how to use it. This episode we'll examine the differences between lazy and strict evaluation and look at use cases for laziness. Episode 20 patrons: Marcus Nielsen Steven Loe Ted Yavuzkurt Michael Meyers Szymon Beczkowski Parl Naranja Paul Brabban Jason Sooter Show Notes: Memoization: https://codeburst.io/functional-memoization-in-javascript-adec62508bd0 Using IEnumerable in C# to generate an infinite sequence: https://brianreiter.org/2011/01/14/ienumerable-is-lazy-and-thats-cool/ FP Chat Slack Community: https://fpchat-invite.herokuapp.com
  • LambdaCast podcast

    19: Starting A Project Functionally

    1:00:53

    Logan walks us through what his experience has been starting a JavaScript project in a functional style and using the best FP tools he can get in the JavaScript ecosystem. Episode 19 patrons: Nathan Sculli Lee Beck David Joyner Nihohit Charles Winebrinner FP Chat Slack Community: https://fpchat-invite.herokuapp.com
  • LambdaCast podcast

    18: Monads

    1:24:27

    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 >= (\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
  • LambdaCast podcast

    17: Applicative Functors

    58:44

    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
  • LambdaCast podcast

    16: Functors

    1:06:08

    Going deeper down the category theory rabbit hole, we explore one of the most common and useful abstractions in the functional programming world. You're likely already familiar with Functors but just didn't know it yet. Episode 16 patrons: Chris Krycho Tyler Harper George Webster Show Notes: Functor map :: (a -> b) -> f a -> f b Bifunctor bimap :: (a -> b) -> (c -> d) -> f a c -> f b d Profunctor dimap :: (a -> b) -> (c -> d) -> f b c -> f a d Phil Freeman's talk on Profunctors: https://www.youtube.com/watch?v=OJtGECfksds
  • LambdaCast podcast

    15: The FP Community

    1:16:38

    Join us as we discuss the FP community. FP has a reputation as harsh and impenetrable but is that really the case? What can you do to make FP a more inviting place? Episode 15 patrons: Chris Lopes Gabe Johnson Randy Shepherd Noel Waghorn Correction: I incorrectly stated that one of the Recurse Center Social rules was “No Feigned Ignorance” it is actually “No Feigned Surprise” Show Notes: Cloud Haskell - http://haskell-distributed.github.io/tutorials/1ch.html Recurse Center Social Rules - https://www.recurse.com/manual Lambdaconf COC - http://fantasyland.institute/initiatives/COC.html Moonconf COC - http://maitria.com/coc Haskellbook - haskellbook.com NY Haskell speaker guide - https://docs.google.com/document/d/1065iwf918SDotEPc0q9TWP_F1haVyeK90MSaBg3IOn8/edit Spa day instead of pub meetup - https://twitter.com/sehurlburt/status/875848925529243648 Steven Syrek - https://twitter.com/sjsyrek
  • LambdaCast podcast

    14: Dynamic and Static Languages

    1:17:02

    The kind of type system a functional language uses has a large impact on the way you use that language. In this episode we discuss the tradeoffs involved in using a static or dynamic language. Our patreon sponsors this month: Javier Troconis Andrew Newman Derek Morr Olov Johansson Show Notes: Philip Wadler Talk: https://www.infoq.com/presentations/category-theory-propositions-principle Denotational Design Scott Wlaschin Poker Implementation https://exit.sc/?url=https%3A%2F%2Ffsharpforfunandprofit.com%2Fddd%2F Conal Elliot presentation on Denotational Design https://www.youtube.com/watch?v=bmKYiUOEo2A Our recomendation for a DDD book https://www.amazon.com/Patterns-Principles-Practices-Domain-Driven-Design/dp/1118714709
  • LambdaCast podcast

    13: ADTs

    1:10:07

    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 Follow us on Twitter: http://twitter.com/lambdacast Show Notes: Denotational Design with the example of a Poker game https://fsharpforfunandprofit.com/ddd/

Get the whole world of podcasts with the free GetPodcast app.

Subscribe to your favorite podcasts, listen to episodes offline and get thrilling recommendations.

iOS buttonAndroid button