13 lines
549 B
TeX
13 lines
549 B
TeX
This is what actually makes haskell such a fine functional language. You might have noticed that I tried hard to not show type signatures of functions that have more than one argument. Well, that's because we have to dig a little deeper to explain what comes next:
|
|
\pause
|
|
\begin{haskellcode}
|
|
addInt :: Int -> Int -> Int
|
|
addInt x y = x + y
|
|
\end{haskellcode}
|
|
\pause
|
|
So, what is happening here? You probably expected something like:
|
|
\begin{haskellcode}
|
|
addInt :: (Int, Int) -> Int
|
|
addInt (x, y) = x + y
|
|
\end{haskellcode}
|
|
which is actually pretty close. |