
4 Feb
2009
4 Feb
'09
4:22 p.m.
Manlio Perillo ha scritto:
[...]
I personally prefer the Python solution, where we have two operators with the same behaviour over all the numbers.
In Haskell, something like
(/) :: (Num a, Real b) => a -> a -> b
This should be (/) :: (Num a, Fractional b) => a -> a -> b but I'm not sure it is correct.
(//) :: (Num a, Integral b) => a -> a -> b
Manlio Perillo