def clone_first_length
bendtorch-core@0.1.0.0 · src/tensor/observation.bend:263
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
263def clone_first_length(-shape: Shape.Shape, result: Result<&2, &1, Core.Error, Core.Tensor<shape>>) -> Maybe<&2, Nat>:
264 match result:
265 case Fail{error}:
266 None{}
267 case Done{tensor}:
268 Some{clone_first_length_pair(shape, Core.clone(shape, tensor))}