def index_result

bendtorch-core@0.1.0.0 · src/shape/LAWS.bend:12

import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as LAWS
import 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)