Api.new_read: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/api.bend as Api Lines 671-685 of bendtorch-core@0.1.0.0/src/storage/api.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&start_line=671&end_line=685 import Base import bendtorch-core@0.1.0.0/src/storage/model.bend as Model import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as Laws import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith def new_read(+n: Nat, +value: F32, allowed: Bool, +ops: List<&2, Laws.Op>, +j: U32, yes: {True{} == allowed : Bool}, +limit: {Nat.is_le(n, Model.capacity(20n)) == True{} : Bool}, +inside: {Nat.is_lt(U32.to_nat(j), n) == True{} : Bool}) -> {Laws.read(Laws.replay(ops, Laws.created.of(Storage.new_checked(n, value, allowed))), j) == Done{Laws.expected(ops, n, j, value)} : Result<&2, &2, Storage.Error, F32>}: match n: case 0n: Empty.absurd({Laws.read(Laws.replay(ops, Laws.created.of(Storage.new_checked(0n, value, allowed))), j) == Done{Laws.expected(ops, 0n, j, value)} : Result<&2, &2, Storage.Error, F32>}, Arith.lt_zero(U32.to_nat(j), inside)) case 1n+p: match allowed: case True{}: meta_read(1n+p, value, Storage.depth_seek(20n, 1n+p, 0n, 1n, Nat.is_le(1n+p, 1n)), ops, j, seek(1n+p, limit, {==}), inside) case False{}: Empty.absurd({Laws.read(Laws.replay(ops, Laws.created.of(Storage.new_checked(1n+p, value, False{}))), j) == Done{Laws.expected(ops, 1n+p, j, value)} : Result<&2, &2, Storage.Error, F32>}, Arith.clash_true(yes)) Uses (23): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=Op https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=created.of https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=expected https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=read https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=replay https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&name=meta_read https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/api.bend&name=seek https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/arith.bend&name=clash_true https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/arith.bend&name=lt_zero https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=depth_seek https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/main.bend&name=new_checked https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/model.bend&name=capacity