Comment Comment by biscarch All functions in Haskell are curried by defaultYour `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. parent biscarch 9 years ago
Your `add2` uses a tuple instead of currying whereas `add1` is already curried. In ghci:
So you could have an `add3` just by applying 3 as the first argument. 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.