Pick.search.first: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/correctness/pick.bend as Pick Lines 247-262 of bolt@1.27.0.0/src/rules/correctness/pick.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/correctness/pick.bend&start_line=247&end_line=262 import Base import bolt@1.27.0.0/src/syntax/tree.bend as Tree # the first statement of the chain that reads xx, the chain's end (NNil) # when none does; hit: prev, the one before the chain, did def search.first(nn: Tree.Node, +xx: String, prev: Tree.Node, hit: Bool) -> Tree.Node: match nn: case Tree.NCons{+h, t}: match hit: case True{}: prev case False{}: search.first(t, xx, h, search.reads(h, xx)) case _other: match hit: case True{}: prev case False{}: Tree.NNil{} Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/correctness/pick.bend&name=search.reads https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node