• Friday , 29 May 2020

Higher-order functions – Part 1 of Functional Programming in JavaScript

Code Canyon



💖 Support the show by becoming a Patreon
https://www.patreon.com/funfunfunction

In this video series, I will teach you how to do functional programming in JavaScript. In this first one, I will tell you about one of the most important concepts in functional programming: Higher-order functions. I will talk about what higher order-functions are, and then move on to code, and show you how to use them. I will also tell you why you should learn functional programming in the first place.

Original source

3d Ocean

Related Posts

21 Comments

  1. Fun Fun Function
    May 7, 2019 at 17:38

    +Andrzej klapek Great point! That is correct, I made a mistake. It's not part of ES6. It's so common that I just assumed that it was. You need to use underscore, lodash or mout.

  2. Константин Сафонов
    May 7, 2019 at 17:38

    Thanks man. Really good videos.

  3. ian summerlin
    May 7, 2019 at 17:38

    because we're writing enterprise-grade software hahaha

  4. Erez Lieberman
    May 7, 2019 at 17:38

    great tutorial.
    one thing about reject https://stackoverflow.com/a/52705433/2721050 🙂

  5. Laspark - FMGordillo
    May 7, 2019 at 17:38

    At the end of the vid I thought that my phone was ringing, lol

  6. Ben Friedman
    May 7, 2019 at 17:38

    Map, reduce, and filter are obvious winners, so much so, that they have been quickly adopted in imperative languages like java. The harder questions to answer are, … How can FP promote SOLID principles, and "cohesion over coupling", and encapsulation? How do we use FP to make code more readable and lower long term maintenance costs, when working in medium to large teams?

  7. Aaron
    May 7, 2019 at 17:38

    Please please please make a video series on react hooks. I came back to this video series to leave that comment, because it's what set me down my journey of functional programming.

  8. blue balls
    May 7, 2019 at 17:38

    TypeError: animal.reject is not a function , i get this error after running npm install underscore -g

  9. Philip Krause
    May 7, 2019 at 17:38

    var isDog = function(animal) {
    return animal.species === 'dogs'
    }

    Why isn't it animals.species ? How does the program know to pull from the animals array? I guess I don't understand how animal.species works. Thanks for anyone's help.

  10. William Lemmond
    May 7, 2019 at 17:38

    Hi, MPJ,
    Sorry I've been out of touch. For months, I was focused on classes, and trying to rebuild my web comic site. And I got pretty discouraged, So I came back to the beginning, as I know I'll need a lot of review.

    And I'm wondering how you get that example code to work. The animals array has elements with species === "dog", not "dogs". And I know computers don't really understand words, so how does a computer know that the animals array of more than one animal. How does the computer recognize what you're asking it to do, when you use a function that uses the argument "animal"? I really wish coding worked so easily, but there might be random chaos, down that path.

    Are we really able to instantiate new variables on the fly, that way, such as "animals", and new values, such as "dogs"?

    Oh, why am I asking here? You're too busy. And if I could even find the forum, how do I bring this up for discussion? … No, wait, I found the forum, and you've made it easy enough for patrons to get back in, even when they're 60, and didn't grow up with computers. Thanks. Posted in forum, under Programming.

  11. OnlineLifeis Real
    May 7, 2019 at 17:38

    Great Video. I'm curious about the music used in this video.

  12. Zohaib Khan
    May 7, 2019 at 17:38

    Me: "why isn't he writing arrow function? 🤔"
    Me: "ooohhhhhh 😱"

    Me: "but why are you looking like a redneck? 🤔"
    Me: "ohhhhh 😱"

  13. Almighty Prajapathi
    May 7, 2019 at 17:38

    What's the font used in the editor?

  14. iwantcheesypuffs
    May 7, 2019 at 17:38

    return animal.species === 'dogs' is null or empty object as there are no "dogs" in animals object, only two "dog"

  15. Algorithm Engineer
    May 7, 2019 at 17:38

    I agree that functional design definitely helps you write fewer bugs! This is exactly why I promote a functional design for business logic! Business logic should not rely on state! You should be able to pass in certain arguments and it will behave the same every time! Thanks for the video! This was a great primer for javascript HOFs!

  16. seriypshick
    May 7, 2019 at 17:38

    a => a.species === 'dog'

  17. Richard Bourne
    May 7, 2019 at 17:38

    HEY! I don't know if anyone else said this in your comments but your missing a comma in your array declaration xD @ Harold, The Fish!

  18. TheLollercaster
    May 7, 2019 at 17:38

    1:50 that was a good one haha
    I like how your hands were everywhere. I found the video entertaining and educating at the same time.
    Nice job!

  19. Brian B
    May 7, 2019 at 17:38

    I'm learning React, and these lessons are going to help a lot.

  20. Ada Rey
    May 7, 2019 at 17:38

    Tack så jätte mycket Mattias!!

  21. Mark A
    May 7, 2019 at 17:38

    I found a new dev mentor online.. watching every video

Leave A Comment

You must be logged in to post a comment.