world. Anyone have an article that explains functional programming with real world examples, which actually makes sense?
map(add(1)) Can't do this if add isn't curried can you?
Look at a contrived example: const add = (x, y) => x + y; As such, if you needed to add 10 to a lot of things, you might want to create: const add10 = x => add(x, 10); But if your original function was curried, it'd be: const add = x => y => x + y; const add10 = add(10);
Обсуждают сегодня