Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Why currying?#

Sumit Rawal answered on November 21, 2020 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • currying in javascript
  • currying in javascript
  • JavaScript currying
  • function currying javascript
  • What is currying in JavaScript
  • javascript currying
  • currying javascript
  • Currying
  • JavaScript currying
  • currying in js
  • currying in javascript
  • add curry function

  • Why currying?#

    0

    You might have noticed how the new curried sum function isn’t all too different from our very first sum function which was taking a single list of parameters with three arguments. So, what is the point of currying?

    Our curried sum function is much more flexible than the non-curried version and gives us a more generic function which we can use in multiple different ways. For instance, we can simply pass the cube function to sum without passing the second parameter list (1,5). sum(cube) is valid on its own as it is a valid function call and returns another function. The second parameter of two integers can now be passed whenever required later on in the program.

    Let’s wrap up our discussion in the next lesson by taking a closer look at how multiple parameter lists expand.

    Popularity 3/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: whatever
    Link to this answer
    Share Copy Link
    Contributed on May 23 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10

    Closely Related Answers



    1
    Popularity 9/10 Helpfulness 4/10 Language javascript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Sep 30 2022
    Robert Misener
    0 Answers  Avg Quality 2/10

    9
    Popularity 10/10 Helpfulness 2/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Nov 21 2020
    Pink Person
    0 Answers  Avg Quality 2/10

    1
    Popularity 10/10 Helpfulness 1/10 Language javascript
    Source: dev.to
    Link to this answer
    Share Copy Link
    Contributed on Jan 10 2022
    Prickly Partridge
    0 Answers  Avg Quality 2/10

    0

    B)

    A way of writing functions with multiple parameter lists 

    Popularity 9/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on May 23 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.