Plan.walk: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lint/plan.bend as Plan Lines 101-122 of bolt@1.27.0.0/src/lint/plan.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lint/plan.bend&start_line=101&end_line=122 import Base import bolt@1.27.0.0/src/lint/world.bend as W # every `.bend` file under the directories still queued, the fuel bounding how # many directories are read, each read through the World's listing. What is # found is put in front of what came before, not after it, so the walk stays # linear; `files` sorts at the end regardless. def walk( fuel: Nat, +world: W.World, queue: List<&2, String>, acc: List<&2, String>, seen: List<&2, String> ) -> Walk: match fuel: case 0n: Walk{acc, seen} case 1n+f: match queue: case Nil{}: Walk{acc, seen} case Con{+dir, rest}: +es = W.listing(world, dir) walk(f, world, List.append(&2, String, rest, walk.dirs(es, dir)), List.append(&2, String, walk.bends(es, dir), acc), dir <> seen) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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/lint/plan.bend&name=Walk https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lint/plan.bend&name=walk.bends https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lint/plan.bend&name=walk.dirs https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lint/world.bend&name=World https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lint/world.bend&name=listing