Fs.read_go: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs Lines 455-464 of mylsm-lsm-store@0.6.0.1/src/Fs.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/Fs.bend&start_line=455&end_line=464 import Base # Fuel-bounded sweep 0..count-1. Startup-only use (spec ยง10 below): the # directory is stable during recovery, so count-then-fetch is exact. def read_go(fuel: Nat, +path: String, +idx: Nat, acc: List) -> IO(List): match fuel: case 0n: IO.pure(List, List.reverse(&1, String, acc)) case 1n+f: do IO>: nm : String <- IO.try(String, read_dir_at(path, idx)) read_go(f, path, Nat.add(idx, 1n), grab_name(nm, acc)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.try https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse 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=String https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Fs.bend&name=grab_name https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Fs.bend&name=read_dir_at