This content originally appeared on DEV Community and was authored by ?? Jasper de Jager
Function currying
Hard to put vomit and curry together in a title, but I had to ask ?
I see this posted a lot on dev.to, function currying, but I find it not that readable myself TBH. What do you think?
And please tell me why ?
function multiply(a) {
return (b) => {
return (c) => {
return a * b * c
}
}
}
console.log(multiply(1)(2)(3)) // 6
function currying ✔||??
❤: Commit (I'd commit something like this)
?: Vomit (we all know unicorns don't vomit)
?: Like your post please continue this series!
Let's vote! ?
Photo by Jason Leung on Unsplash
This content originally appeared on DEV Community and was authored by ?? Jasper de Jager
?? Jasper de Jager | Sciencx (2021-04-30T07:48:14+00:00) ✔||? Commit or Vomit | function currying ?. Retrieved from https://www.scien.cx/2021/04/30/%e2%9c%94%f0%9f%a4%a2-commit-or-vomit-function-currying-%f0%9f%8d%9b/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.