TensorBackward.constant_at: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward Lines 1060-1070 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=1060&end_line=1070 import Base # Whether node id of a newest-first list of count nodes is a constant. def constant_at(nodes: List<&2, Node>, +count: Nat, +id: Nat, same: Bool) -> Bool: match nodes count same: case Nil{} count same: False{} case Con{node, rest} 0n same: False{} case Con{node, rest} 1n+below True{}: is_constant(node) case Con{node, rest} 1n+below False{}: constant_at(rest, below, id, at_head(below, id)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=is_constant