def natural_step_result
bendtorch-core@0.1.0.0 · src/tensor/elementwise.bend:195
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
195def natural_step_result(-shape: Shape.Shape, -cursor: Nat, -index: U32,
196 -exact: {U32.to_nat(index) == cursor : Nat}, result: Step<shape>) -> NaturalStep<shape, cursor>:
197 match result:
198 case Stop{left, right, error}:
199 NaturalStop{left, right, error}
200 case Continue{state}:
201 NaturalContinue{state, index, exact}