Run.sources.under: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/ws/run.bend as Run Lines 345-354 of ezx@1.11.0.0/src/ws/run.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/ws/run.bend&start_line=345&end_line=354 import Base import ezx@1.11.0.0/src/io/file.bend as F import ezx@1.11.0.0/src/lock/world.bend as LW # every listed file under a directory, read, as the lock takes it def sources.under(+dir: String, ps: List<&2, String>) -> IO(List<&2, LW.Source>): match ps: case []: IO.pure(List<&2, LW.Source>, []) case +hd <> tl: do IO>: mm : Maybe<&2, String> <- F.read(dir ++ "/" ++ hd) rest : List<&2, LW.Source> <- sources.under(dir, tl) return LW.Source{hd, F.text_of(mm)} <> rest Uses (10): 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/io/file.bend&name=read https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/io/file.bend&name=text_of https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/lock/world.bend&name=Source