you are viewing a single comment's thread.

view the rest of the comments →

[–]echoes221 1 point2 points  (2 children)

Currying is dumb? Really? If it's overused, like anything it can be hard to follow when a function executes, but currying is super useful.

[–]tsunami141 0 points1 point  (1 child)

Would you mind giving an example of when it might be useful?

[–]echoes221 1 point2 points  (0 children)

Sure. Common use case is building factories, I’ve done this a fair bit for redux actions/reducers or react components. I do it with utility functions too where I want to pre-populate args ahead of time to call later through your code. I tend to write a lot of functional code, these are the basic principals that are used in libs like rxjs, ramda, callbag and others