Backward.find: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/backward.bend as Backward Lines 67-76 of bendtorch-core@0.1.0.0/src/autograd/backward.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward.bend&start_line=67&end_line=76 import Base # The element with id `id` in a newest-first list of count elements: the head # has id count - 1, and the walk counts down from it. def find(-A: Data, xs: List<&2, A>, +count: Nat, +id: Nat) -> Maybe<&2, A>: match xs count: case Nil{} count: None{} case Con{head, rest} 0n: None{} case Con{head, +rest} 1n+below: picked(A, head, unit => find(A, rest, below, id), Nat.is_eq(below, id)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/backward.bend&name=picked