ConstructionPROOF.fill_write_pair: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/construction_PROOF.bend as ConstructionPROOF Lines 436-458 of bendtorch-core@0.1.0.0/src/tensor/construction_PROOF.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/construction_PROOF.bend&start_line=436&end_line=458 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core def fill_write_pair(-shape: Shape.Shape, +value: F32, +rest: List<&2, F32>, +cursor: Nat, +index: U32, -original: Core.Tensor, pair: Core.Tensor & Result<&2, &2, Core.Error, Unit>, -same: {pair == Core.write_flat(shape, original, index, value) : Core.Tensor & Result<&2, &2, Core.Error, Unit>}, -converted: {U32.to_nat(index) == cursor : Nat}, -model: Core.CheckedUpdateModel, -rec: @tensor: Core.Tensor -> FillOutcome) -> FillOutcome rest, cursor, Core.fill_values_step(shape, tensor => Core.fill_values(rest, shape, tensor, 1n+cursor), pair)>: (tensor, result) = pair match result: case Fail{error}: FillOutcome{Unit{}} case Done{unit}: FillOutcome{ {\{FillOutcome: meaning => meaning} : FillOutcome rest, cursor, Core.fill_values(rest, shape, tensor, 1n+cursor)> -> FillMeaning(shape, original, value <> rest, cursor, Core.fill_values(rest, shape, tensor, 1n+cursor))}(fill_advance(shape, value, rest, cursor, original, tensor, Core.fill_values(rest, shape, tensor, 1n+cursor), written_model(shape, original, tensor, cursor, index, value, unit, converted, %Equal.sym(Core.Tensor & Result<&2, &2, Core.Error, Unit>, (tensor, Done{unit}), Core.write_flat(shape, original, index, value), same) : Core.CheckedUpdateMeaning(shape, original, index, value, _) {\{Core.CheckedUpdateModel: meaning => meaning} : Core.CheckedUpdateModel -> Core.CheckedUpdateMeaning(shape, original, index, value, Core.write_flat(shape, original, index, value))}(model)), {\{FillOutcome: meaning => meaning} : FillOutcome -> FillMeaning(shape, tensor, rest, 1n+cursor, Core.fill_values(rest, shape, tensor, 1n+cursor))}(rec(tensor))))} Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym 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=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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=Base/base.bend&name=Unit 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/tensor/construction_PROOF.bend&name=FillMeaning https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/construction_PROOF.bend&name=FillOutcome https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/construction_PROOF.bend&name=fill_advance https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/construction_PROOF.bend&name=written_model https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=CheckedUpdateMeaning https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=CheckedUpdateModel https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Tensor https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=fill_values https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=fill_values_step https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=write_flat