What is currying in #JavaScript #shorts

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I will like and subscribe when you post a worthy use case 😅

dave
Автор

An area function calculating volume. 🤯

Vichion
Автор

"We generate fears while we sit. We overcome them by action."
— *Dr. Henry Link*

BusinessVision.
Автор

I always curry my functions. They are more tasty like that

spicynoodle
Автор

This has "Only asked off I could, didn't consider if I should" vibes...

saryakan
Автор

length * width * height = volume
length * width = area

shawndonnin
Автор

currying as in curry, jajajaja I am amusing ain’t I

turolretar
Автор

You are one of the smartest programmer.... ur OOP PHP was a this currying is good with returning different parameters of a UI which control by a single event listener

abahiduh
Автор

I see... didnt know that!
so currying is the process when you change a function that has multiple arguments into a sequence of functions with one argument each.

fleckenfurz
Автор

Do you want to write more, slower, and less efficient? Do this one simple trick...

lucyegan
Автор

nice short plz also make something on infinite currying

vikrambais
Автор

This kinda stuff is really really cool, *but* I think there's more of a use case where the number of args is as many as one wants (so recursive sort of)

Alternatively one could also make a sort of domain specific language, or a cross platform file path generator or what have you

scvnthorpe__
Автор

Why and when would you use this? This just seems like more work.

brucebarry
Автор

One big question my self back ...

whats is the, meaning of currying ???? please anyone explain it

vinothkumarv
Автор

Oh my god, so easy I always feared of this 😄

adivmt
Автор

Interresting. But obviously possible.
Shorter and much easier to read:
const Volume=(b)=>(h)=>(l)=>b*h*l;
const v=Volume(2)(3)(10); // v is 60


Works in other languages as well, e.g. C#
var volume=(double l) => (double b)=>(double h)=>l*b*h;
// writes 60

nothingisreal
Автор

unrelated but why is the area of your rectangle have 3 parameters.?

asagiai
Автор

This code is so confusing please don't :)

serhiibudnik
Автор

U look like shakib al Hasan Bangladeshi all rounder

saumytiwari
Автор

Please make on new React JS redux crash 2022 every topic explanation

DeepakGupta-hjdv
join shbcf.ru