next up previous contents index
Next: generator Up: IntegerSegment Previous: ..   Contents   Index


by,step


Usage

s by n
step s


Signatures

by: (%,Z) $\to$ %
step: % $\to$ Z


Parameter Type Description
s % a segment
n Z a step


Returns

s by n changes s to become the segment consisting of every ${n}^{{\rm th}}$ integer in its range, i.e.the integers $a, a + n, a + 2n, \dots$ that are within the range $[a,b]$ or $[a, +\infty)$ of s, while step(s) returns n such that s is the segment consisting of every ${n}^{{\rm th}}$ integer in its range.


Remarks

The function s by n does not create a new segment but side-effects s, whose former step is lost.



Manuel Bronstein 2004-06-28