def written_length
bendtorch-core@0.1.0.0 · src/tensor/observation.bend:117
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
117def written_length(-shape: Shape.Shape, +index: U32, +value: F32,
118 result: Result<&2, &1, Core.Error, Core.Tensor<shape>>) -> Maybe<&2, Nat>:
119 match result:
120 case Fail{error}:
121 None{}
122 case Done{tensor}:
123 Some{written_length_pair(shape, Core.write_flat(shape, tensor, index, value))}