klequis / zz-haskell-notebook

Notes from learning Haskell
1 stars 0 forks source link

Currying #61

Open klequis opened 2 years ago

klequis commented 2 years ago

Currying is the process of transforming a function that takes multiple arguments into a series of functions that each take one argument and return one result. This is accomplished through nesting. In Haskell, all functions are curried by default. You don’t need to do anything special yourself.

In Haskell, a function that appears to take two parameters is actually 2 functions that each take 1 parameter.

klequis commented 2 years ago

While the above is correct a more in-depth explanation with examples is desired.