definition:
|
class (Real a, Enum a) => Integral a where
div, mod :: a -> a -> a
quot, rem :: a -> a -> a
divMod :: a -> a -> (a, a)
quotRem :: a -> a -> (a, a)
toInt :: a -> Int
n `div` d = q
where (q, _) = divMod n d
n `mod` d = r
where (_, r) = divMod n d
n `quot` d = q
where (q, _) = quotRem n d
n `rem` d = r
where (_, r) = quotRem n d
|
methods:
|
["div 2 :: a -> a -> a","mod 2 :: a -> a -> a","quot 2 :: a -> a -> a","rem 2 :: a -> a -> a","divMod :: a -> a -> (a, a)","quotRem :: a -> a -> (a, a)","toInt :: a -> Int"]
|