Logo

Programming-Idioms

History of Idiom 37 > diff from v33 to v34

Edit summary for version 34 by Debaran:
New Scala implementation by user [Debaran]

Version 33

2018-10-12, 20:30:15

Version 34

2019-02-02, 04:24:43

Idiom #37 Currying

Transform a function that takes multiple arguments into a function for which some of the arguments are preset.

Idiom #37 Currying

Transform a function that takes multiple arguments into a function for which some of the arguments are preset.

Extra Keywords
curry
Extra Keywords
curry
Code
def add(x: Int, y: Int): Int = x + y
def add5(n: Int) = add(5, n)
Comments bubble
With only single parameter list