Better HN
topnewbestaskshowjobs
Log inSign up

curry_is_easy

3 karma · joined Apr 7, 2024 (2y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

Since you know JavaScript, this should help.

Uncurried:

((x, y) => x * y)(3, 5) === 15

Curried:

(x => y => x * y)(3)(5) === 15

If you don't understand that, your problem is that you don't understand anonymous functions (lambdas), not that you don't understand currying.