def index_result
import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as LAWSimport Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
12def index_result(-shape: Shape.Shape, result: Result<&2, &2, Shape.Error, Shape.FlatIndex<shape>>) -> Maybe<&2, U32>:
13 match result:
14 case Fail{error}:
15 None{}
16 case Done{index}:
17 Some{Shape.index_value(shape, index)}
Uses (7)
Used by (10)
- bendtorch-core@0.1.0.0/src/shape/boundary_proofs:flatten_checked
- bendtorch-core@0.1.0.0/src/tensor/matrix_index_proof:flat_pair
- bendtorch-core@0.1.0.0/src/shape/LAWS:flatten_checked_refines
- bendtorch-core@0.1.0.0/src/shape/boundary_proofs:flat_view
- bendtorch-core@0.1.0.0/src/shape/boundary_proofs:flatten_fits
- …