def finish_step

bendtorch-core@0.1.0.0 · src/tensor/elementwise.bend:222

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
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core

222def finish_step(-shape: Shape.Shape, -cursor: Nat,
223  rec: State<shape> -> (Core.Dynamic & Core.Dynamic) & Result<&2, &1, Core.Error, Core.Dynamic>,
224  result: NaturalStep<shape, cursor>) -> (Core.Dynamic & Core.Dynamic) & Result<&2, &1, Core.Error, Core.Dynamic>:
225  match result:
226    case NaturalStop{left, right, error}:
227      ((left, right), Fail{error})
228    case NaturalContinue{state, index, exact}:
229      rec(state)

Uses (9)

Used by (6)