Skip to content

std/steppable

Import with import std/steppable.

Interfaces

interface Steppable<'S> {
    fn step_by(value: self, by: 'S): Maybe<self>
}

Protocol for values that can move by a caller-provided step.

Discrete.next is for types with a canonical next value. Steppable is for types where the caller supplies the step, such as Decimal values stepping by 0.1d or Codepoints stepping by an Int count.