BackwardLAWS.reach: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/backward_LAWS.bend as BackwardLAWS Lines 51-60 of bendtorch-core@0.1.0.0/src/autograd/backward_LAWS.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward_LAWS.bend&start_line=51&end_line=60 import Base import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward def reach(nodes: List<&2, Backward.Node>, flags: List<&2, Bool>, +count: Nat) -> List<&2, Bool>: match nodes flags count: case Nil{} flags count: flags case Con{node, rest} Nil{} count: Nil{} case Con{node, rest} Con{flag, pending} 0n: Nil{} case Con{node, rest} Con{+flag, pending} 1n+below: flag <> reach(rest, spread(node, flag, below, pending), below) Uses (5): 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/backward.bend&name=Node https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward_LAWS.bend&name=spread