def clone_written_first

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

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

326def clone_written_first(-shape: Shape.Shape, +index: U32, +value: F32, +other: U32,
327  result: Result<&2, &1, Core.Error, Core.Tensor<shape>>) -> Maybe<&2, F32>:
328  match result:
329    case Fail{error}:
330      None{}
331    case Done{tensor}:
332      clone_written_first_pair(shape, index, value, other, Core.clone(shape, tensor))

Uses (9)

Used by (3)