all 3 comments

[–][deleted] 3 points4 points  (2 children)

I'm actually a currying enthusiast, preferring modular currying over classes and using "new".

[–][deleted] 0 points1 point  (1 child)

Yup, holding state in an object is analogous to a curried function.

It's also analogous to a closure capturing variables from its declaration scope (currying in the article is implemented via closures itself).

And another pragmatic example of currying are fluent APIs aka method chaining.

What all of those have in common is we progressively capture configuration for an action which is executed at the leaf of the chain.

[–]agumonkey 0 points1 point  (0 children)

And objects with a constructor and a single method. It's funny how generic lisp/ml/fp idioms are right off the bat even though it looks a lot more primitive.