std/steppable
import std/steppable to use it. Source: src/std/steppable.iyi at v0.18.0.
NumericStepIterator(T)class
pub class NumericStepIterator(T)
def initialize(current : T, limit : T | ::Nil, step : T, exclusive : ::Bool)
def next : T | Stop
def sum(initial : U) : U forall U
endSteppabletrait
pub trait Steppable
# Iterates from self to limit incrementing by step_val on each iteration.
def step(*, to limit : self | ::Nil = nil, by step_val : self, exclusive : ::Bool = false, & : (self -> ::Nil)) : ::Nil
# Returns an Iterator that iterates from self to limit by step_val.
def step(*, to limit : self | ::Nil = nil, by step_val : self, exclusive : ::Bool = false) : NumericStepIterator(self)
endStd::Iterator::Iterator for NumericStepIterator(T) forall Timpl
impl Std::Iterator::Iterator for NumericStepIterator(T) forall T
endSteppable for Int32impl
impl Steppable for Int32
endSteppable for Int64impl
impl Steppable for Int64
endSteppable for Float64impl
impl Steppable for Float64
end
Implements a step method for iterating from a value. T needs
+,-,<=>, and comparison with the integer 0 (>/<).