History of Idiom 37 > diff from v26 to v27
Edit summary for version 27 by hrschueler:
[Haskell] Removed parantheses and argument, added type, removed sp, added importecial symbols
[Haskell] Removed parantheses and argument, added type, removed sp, added importecial symbols
↷
Version 26
2018-01-28, 08:25:16
Version 27
2018-05-15, 18:32:13
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.
Comments bubble
(curry range 1) = _λ i ↦ [1..i]
Haskell begins with most functions already curried and allowing partial projection, hence the uncurried range sprang to mind as a notable exception for this illustration.
Comments bubble
(curry range 1) = \ i -> [1..i]
curry :: a -> a -> [a]
Haskell begins with most functions already curried and allowing partial projection, hence the uncurried range sprang to mind as a notable exception for this illustration.