mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xpetit
def316d0f3
|
4 years ago | |
---|---|---|
.. | ||
README.md | 4 years ago |
README.md
Currify
Instructions
Create the function currify
that will curry any functions put as argument.
example:
const mult2 = (el1, el2) => el1 * el2
console.log(mult2(2, 2)) // result expected 4
const mult2Curried = currify(mult2)
console.log(mult2Curried(2)(2)) // result expected 4
// (same result, with a function that has technically only one argument)