def after_length

bendtorch-core@0.1.0.0 · src/tensor/observation.bend:54

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

54def after_length(-shape: Shape.Shape, +index: U32,
55  result: Result<&2, &1, Core.Error, Core.Tensor<shape>>) -> Maybe<&2, Nat>:
56  match result:
57    case Fail{error}:
58      None{}
59    case Done{tensor}:
60      Some{after_length_pair(shape, Core.read_flat(shape, tensor, index))}

Uses (9)

Used by (8)