IntProgression
An ordered progression of Int values with a nonzero, signed step.
Positive steps move upwards; negative steps move downwards. The inclusive last is adjusted to align with first and step, so it may differ from endInclusive. A progression is empty when its bounds run against the step direction.
Parameters
the starting value.
the requested inclusive bound in the direction of traversal.
the signed difference between successive elements.
Throws
if step is zero or Int.MIN_VALUE.
Inheritors
Functions
Appends non-null transformed elements to destination in iteration order.
Creates a progression with the same direction and a new positive step magnitude.
Numeric accumulation traverses once in iteration order without an intermediate collection. Empty iterables return positive numeric zero. Integer arithmetic wraps at the result width; Float/Double addition retains ordinary rounding, infinities and NaN. Byte/Short widen to Int; UByte/UShort widen to UInt. Iterator failures propagate unchanged.
Sums selector once per element in iteration order, returning Double zero when empty. No collection is allocated; selector/iterator exceptions and inline non-local returns propagate. Addition retains ordinary Double rounding, infinities and NaN.
Sums selector once per element in iteration order, returning Int zero when empty. No collection is allocated; selector/iterator exceptions and inline non-local returns propagate. Addition uses ordinary wrapping Int arithmetic.
Sums selector once per element in iteration order, returning Long zero when empty. No collection is allocated; selector/iterator exceptions and inline non-local returns propagate. Addition uses ordinary wrapping Long arithmetic.
Sums selector once per element in iteration order, returning UInt zero when empty. No collection is allocated; selector/iterator exceptions and inline non-local returns propagate. Addition uses ordinary wrapping UInt arithmetic.
Sums selector once per element in iteration order, returning ULong zero when empty. No collection is allocated; selector/iterator exceptions and inline non-local returns propagate. Addition uses ordinary wrapping ULong arithmetic.