Pure and Higher Order Functions

Sdílet
Vložit
  • čas přidán 27. 09. 2018
  • This tutorial covers two programming concepts that you need to understand functional programming. It discusses pure functions and higher order functions, both within the context of JavaScript.
    Code GIST: gist.github.com/prof3ssorSt3v...

Komentáře • 27

  • @rob9709
    @rob9709 Před 3 lety

    If there wasn't people like you, I would have given up learning code. Thanks.

  • @mohammadalrefaai-games8034

    You're a great teacher thank you

  • @mattcroat
    @mattcroat Před 5 lety +6

    You're a great teacher. I appreciate the time and effort you put into these.

  • @parthipanchandrasekeran5579

    Brilliant! Thank you 😊

  • @yaolegoleynik
    @yaolegoleynik Před 4 lety +1

    Thank you that was very clear :)

  • @staffordnelson9053
    @staffordnelson9053 Před 3 lety

    Thank you Steve.

  • @objectObject212
    @objectObject212 Před 5 lety

    Great video, thx.

  • @uraichur
    @uraichur Před 2 lety

    Wow. Thank you !

  • @LearnEnglishwithKevin101

    Dear Steve, I watched your video about callback functions. My question is, a higher Order Function needs a call back function?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před rokem

      The Higher Order function can accept and return any function reference. It doesn't have to be a callback function that you are passing around.

  • @SatisfyingNerd
    @SatisfyingNerd Před 5 lety

    So, higher order function is basically a function that return the result of another function which is ran inside it?

    • @rob9709
      @rob9709 Před 3 lety

      A high order function is basically a function that takes another function as argument, that's it.

  • @amarg26
    @amarg26 Před 5 lety +1

    Does Higher Order Function is also Currying Function and Closure?

  • @amarg26
    @amarg26 Před 5 lety

    console.log('x return value'); when this will going to return?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 5 lety

      Not sure what you are asking here.

    • @amarg26
      @amarg26 Před 5 lety

      console.log('x return value'); when this will print? When I run programme I get just x at console.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 5 lety

      @@amarg26 it sounds like you have quatation marks around the variable. That will make it a string instead of a variable

    • @PerfectSwingDance
      @PerfectSwingDance Před 5 lety +1

      _output is now a function. You are bound to call it
      line 14: return _output();

    • @mildmanneredthinkingman9323
      @mildmanneredthinkingman9323 Před 3 lety

      @@SteveGriffith-Prof3ssorSt3v3 I have it written exactly like how it's in the video, and console.log('x return value') does not print for me either. Am I missing something? I also want to thank you, your videos have been helpful.

  • @samoh6084
    @samoh6084 Před 3 lety

    🤔not so sure

  • @Godtickles
    @Godtickles Před 5 lety

    I don't know if my brain just can't handle high-order functions but I just can't seem to grasp the concept :(

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Před 5 lety

      Different concepts take different amounts of time to make sense for different people. Keep practicing and coming back to the concepts you dont understand yet. Eventually you will get the lightbulb moment.

    • @Godtickles
      @Godtickles Před 5 lety +1

      @@SteveGriffith-Prof3ssorSt3v3 I will defintely be coming back until I understand this. I just have a trouble I think following the control flow of a higher order function. Like with other functions it makes sense what happens after what, but I dont quite understand that with high order functions

  • @susmitobhattacharyya1668

    Can a Higher Order Function be a Pure Function?