Partial application and function composition are the meat-and-potatoes of functional programming.
Automatic currying is syntactic sugar that can make these two easier and clearer as it gets rid of a bunch of named arguments and lambdas. For example, I can write:
foo a b c = a * b + c
I can then apply this partially like this (foo2 just takes argument c):
foo2 = foo 10 20
and compose it with other functions, for example like this:
composed = foo2 >> bar >> baz
Without currying, you'd have something like:
foo (a, b, c) = a * b + c
foo2 (z) = foo (10, 20, z)
composed (a) = (\b -> foo2 (b)) ((\c -> bar (c)) (baz (a)))
Automatic currying is syntactic sugar that can make these two easier and clearer as it gets rid of a bunch of named arguments and lambdas. For example, I can write:
I can then apply this partially like this (foo2 just takes argument c): and compose it with other functions, for example like this: Without currying, you'd have something like: