succ
The successor function.
Syntax
-
succ(n[, m[, d]])-
nis an integer -
mis a positive integer -
dis an integer
-
Description
-
If
nis an integer, thensucc(n)is the next integer, i.e.,n + 1. -
If, in addition,
mis a positive integer, thensucc(n, m)is the next integer modulom, i.e.,(n + 1) mod m. -
If, in addition,
dis an integer, thensucc(n, m, d)is the next integer modulomin the translated interval[d, d + m).
Examples
succ(5)
6
succ(5, 6)
0
succ(5, 4)
2
succ(5, 4, 10)
10
succ(13, 4, 10)
10