ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Function: quotRem
Type: Integral a => a -> Rational
Class: Integral
Description: It returns a tuple: (result of integer division, reminder)
Related: (/), div, quot, recip, rem
Keywords: division

Example 1

Input: quotRem 4 3

Output: (1,1)

Example 2

Input: quotRem 22 8

Output: (2,6)

Example 3

Input: quotRem 12 4

Output: (3,0)

Example 4

Input: quotRem (-12) 6

Output: (-2,0)