Haskell - too few arguments
I want to write a Haskell program that calculates the sum of numbers between two given numbers. I have the following code:
sumInt :: Int -> Int -> Int
sumInt x y
| x > y = 0
| otherwise = x + sumInt x+1 y
But when I compile it I get the following error:
SumInt applies to arguments that are too small.
I don't understand what I am doing wrong. Any ideas?
+3
source to share