Best programming tutorials I have ever seen. Short and to the point. THANK YOU VERY MUCH!!!
@chamnil86664 жыл бұрын
you deserve more lkes.Amazing explanation.thank you.
@HekaFOF7 жыл бұрын
Please continue doing these! Best Ramda vids I have seen :)
@AndrewVanSlaars7 жыл бұрын
HekaFOF Thanks! Glad you like them! I have a bunch of these in a playlist on egghead. vnslrs.io/ramda I’ll still occasionally release some here, but that’s where most of my videos get published these days.
@Mr123anas7 жыл бұрын
what if i want composeAll should increment then double then add?
@AndrewVanSlaars7 жыл бұрын
That one is a little tricky. `add` has an arity of two, meaning it takes two arguments. Each function in a composition after the first one receives the return from the previous function as its input. A function can only return a single value. This means, in order to use `add` at the end of the composition, you need to know the first argument ahead of time and use the result of the previous function in the composition as the second argument.The simplest way to partially apply the first argument to `add` would be with `bind`. You can create a partially applied version of add like `const addFour = add.bind(null, 4)`. Then you can use `addFour` at the end of `composeAll` and it will add 4 and whatever value comes out of the previous step in the composition. Of course, there are utility functions for this sort of thing in libraries like Ramda where you could use something like `R.partial` to do what I described above. You might also look at a function like `R.converge` to approach this problem another way. I hope this helps.