|
|
|
|
|
by biscarch
3119 days ago
|
|
All functions in Haskell are curried by default Your `add2` uses a tuple instead of currying whereas `add1` is already curried. In ghci: Prelude> (+) 3 4 == (+ 3) 4
True
So you could have an `add3` just by applying 3 as the first argument. Prelude> let add3 = (+ 3)
Prelude> add3 5
8
hoogle describes uncurry as a function on pairs. https://www.haskell.org/hoogle/?hoogle=uncurry> uncurry converts a curried function to a function on pairs. |
|
That's not really a meaningful statement. Functions are not really anything "by default".