You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

13 lines
549 B

  1. 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:
  2. \pause
  3. \begin{haskellcode}
  4. addInt :: Int -> Int -> Int
  5. addInt x y = x + y
  6. \end{haskellcode}
  7. \pause
  8. So, what is happening here? You probably expected something like:
  9. \begin{haskellcode}
  10. addInt :: (Int, Int) -> Int
  11. addInt (x, y) = x + y
  12. \end{haskellcode}
  13. which is actually pretty close.