haskell-lectures/VL2/content/VL2_currying7.tex

12 lines
404 B
TeX
Raw Normal View History

As said in the beginning of this section, these two look pretty similar:
\begin{haskellcode}
f :: Int -> Int -> Int
f :: (Int, Int) -> Int
\end{haskellcode}
And we now know that we can convert from one to another. Of course haskell also provides us two functions to do that, here we go:
\begin{haskellcode}
curry :: ((a, b) -> c) -> a -> b -> c
uncurry :: (a -> b -> c) -> (a, b) -> c
\end{haskellcode}