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.
|
|
|
## Currify
|
|
|
|
|
|
|
|
### Instructions
|
|
|
|
|
|
|
|
Create the function `currify` that will curry any functions put as argument.
|
|
|
|
|
|
|
|
example:
|
|
|
|
```js
|
|
|
|
const mult2 = (el1,el2) => el1 * el2
|
|
|
|
console.log(mult2(2,2)) // result epected 4
|
|
|
|
|
|
|
|
|
|
|
|
const mult2Curried = currify(mult2)
|
|
|
|
|
|
|
|
console.log(mult2Curried(2)(2)) // result expected 4
|
|
|
|
// (same result, with a function that has technically only one argument)
|
|
|
|
```
|
|
|
|
|
|
|
|
### Notions
|
|
|
|
|
|
|
|
- [stackoverflow.com/questions/36314/what-is-currying](https://stackoverflow.com/questions/36314/what-is-currying)
|