def replay_snoc

bendtorch-core@0.1.0.0 · src/tensor/from_values_contract.bend:162

import bendtorch-core@0.1.0.0/src/tensor/from_values_contract.bend as FromValuesContract
import Base
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

162def replay_snoc(+ops: List<&2, StorageLaws.Op>, +op: StorageLaws.Op, -storage: Storage.Storage) ->
163  {StorageLaws.replay(List.append(&2, StorageLaws.Op, ops, [op]), storage) == StorageLaws.step(StorageLaws.replay(ops, storage), op) : Storage.Storage}:
164  match ops:
165    case Nil{}:
166      {==}
167    case +first <> +rest:
168      replay_snoc(rest, op, StorageLaws.step(storage, first))

Uses (6)

Used by (10)