Say one wants to calculate the function:
f (x,y) = ((x `mod` 3)+(y `mod` 3)) `mod` 2
Then, if one expands f (-1,0)
manually, one gets:
((-1 `mod` 3)+(0 `mod` 3)) `mod` 2
1
If one however uses an inline function, the result is:
let f (x,y) = ((x `mod` 3)+(y `mod` 3)) `mod` 2 in f (-1,0)
0
What happens when storing the function that yields not the expected result?
I assume this is because f
uses Integral
instead of Int
?