Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 338 Bytes

integral-integral-types.md

File metadata and controls

16 lines (10 loc) · 338 Bytes

Integral – Integral Types

The Integral class extends the Num class and supports two additional methods for working with integral numbers, integer division and integer remainder:

div, mod :: a -> a -> a

ghci> 5 `div` 3
1

ghci> 5 `mod` 3
2

Basic types Int and Integer are instances of the Integral class.