def get
import bendtorch-core@0.1.0.0/src/storage/main.bend as BendtorchCoreimport Base
78def get(storage: Storage, +i: U32) -> Storage & Result<&2, &2, Error, F32>:
79 match storage:
80 case Empty{}:
81 (Empty{}, Fail{OutOfBounds{}})
82 case Owned{+d, +n, array, balanced, valid}:
83 get_checked(d, n, array, i, Nat.is_lt(U32.to_nat(i), n), {==}, balanced, valid)