TensorBackward.freeze: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward Lines 1115-1122 of bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&start_line=1115&end_line=1122 import Base # node wrapped in Frozen{id, .} for each operand id that is a constant of the # newest-first list of count nodes, the first operand outermost. def freeze(ids: List<&2, Nat>, +nodes: List<&2, Node>, +count: Nat, node: Node) -> Node: match ids: case Nil{}: node case Con{+id, rest}: frozen_if(id, freeze(rest, nodes, count, node), constant_at(nodes, count, id, at_head(count, id))) Uses (6): 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=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=at_head https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=constant_at https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=frozen_if