Snapshot.pin.retired.loop: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshot Lines 1261-1287 of mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&start_line=1261&end_line=1287 import Base def pin.retired.loop( retired: List<&2, FileGeneration>, +target: Nat, matches: Bool ) -> RetiredPin: match retired: case Nil{}: RetiredPinMissing{Nil{}} case Con{FileGeneration{+id, +size, +references}, Nil{}}: match matches: case True{}: RetiredPinned{Con{FileGeneration{id, size, Nat.add(references, 1n)}, Nil{}}} case False{}: RetiredPinMissing{Con{FileGeneration{id, size, references}, Nil{}}} case Con{FileGeneration{+id, +size, +references}, Con{FileGeneration{+next_id, +next_size, +next_references}, rest}}: match matches: case True{}: RetiredPinned{Con{FileGeneration{id, size, Nat.add(references, 1n)}, Con{FileGeneration{next_id, next_size, next_references}, rest}}} case False{}: pin.retired.prepend(id, size, references, pin.retired.loop(Con{FileGeneration{next_id, next_size, next_references}, rest}, target, Nat.is_eq(next_id, target))) Uses (8): 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=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&name=FileGeneration https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&name=RetiredPin https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend&name=pin.retired.prepend