WriteContract.write_outside: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/write_contract.bend as WriteContract Lines 202-209 of bendtorch-core@0.1.0.0/src/tensor/write_contract.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/write_contract.bend&start_line=202&end_line=209 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape 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 StorageLaws import bendtorch-core@0.1.0.0/src/tensor/read_write_records.bend as Laws import bendtorch-core@0.1.0.0/src/tensor/read_contract.bend as Reads def write_outside(+shape: Shape.Shape, +fill: F32, +index: U32, +value: F32, outside: {Nat.is_lt(U32.to_nat(index), Shape.logical_numel(Shape.dimensions(shape))) == False{} : Bool}) -> Laws.WriteOutside: +outside = outside Laws.WriteOutside{ write_contract(shape, fill, index, value, Fail{Storage.OutOfBounds{}}, StorageLaws.set_outside(StorageLaws.created(Shape.count(shape), fill), index, value, Reads.size_outside(shape, fill, index, outside))), other => inside => written_value(shape, fill, index, value, other, fill, inside, pick_outside(shape, index, value, other, fill, outside))} Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 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/shape/core.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=count https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=dimensions https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=logical_numel https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=created https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/LAWS.bend&name=set_outside 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/tensor/read_contract.bend&name=size_outside https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/read_write_records.bend&name=WriteOutside https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/write_contract.bend&name=pick_outside https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/write_contract.bend&name=write_contract https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/write_contract.bend&name=written_value