def after_count

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

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

80def after_count(+shape: Shape.Shape, +index: U32,
81  result: Result<&2, &1, Core.Error, Core.Tensor<shape>>) -> Maybe<&2, U32>:
82  match result:
83    case Fail{error}:
84      None{}
85    case Done{tensor}:
86      after_count_pair(shape, Core.read_flat(shape, tensor, index))

Uses (8)

Used by (4)