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.
28 lines
359 B
28 lines
359 B
5 years ago
|
## Flow
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Create the function `flow` that will works as the _.flow([funcs])
|
||
|
from lodash.
|
||
|
|
||
|
Example
|
||
|
|
||
|
``` js
|
||
|
|
||
|
const square = nbr => nbr * nbr
|
||
|
const add2Numbers = (nbr1, nbr2) => nbr1 + nbr2
|
||
|
|
||
|
const flowedFunctions = flow([add2numbers, square])
|
||
|
flowedFunctions(2, 3)
|
||
|
|
||
|
```
|
||
|
|
||
|
returns
|
||
|
|
||
|
```js
|
||
|
25
|
||
|
```
|
||
|
|
||
|
### Notions
|
||
|
|
||
|
- https://lodash.com/docs/4.17.15#flow
|