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: mod
Type: Integral a => a -> a -> a
Class: Integral
Priority: 7
Description: modulo
Related:
Keywords: division, modulo
MATHWORLD Congruence

Example 1

Input: 3 `mod` 12

Output: 3

Example 2

Input: 33 `mod` 12

Output: 9

Example 3

Input: 33 `mod` -12

Output: -3

Example 4

Input: -33 `mod` 12

Output: -9

Example 5

Input: -33 `mod` -12

Output: 3