Run.files.under: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/ws/run.bend as Run Lines 290-299 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=290&end_line=299 import Base import ezx@1.11.0.0/src/io/file.bend as F import ezx@1.11.0.0/src/pkg/pkg.bend as K # every listed file under a directory, read, as the walk takes it def files.under(+dir: String, ps: List<&2, String>) -> IO(List<&2, K.Source>): match ps: case []: IO.pure(List<&2, K.Source>, []) case +hd <> tl: do IO>: mm : Maybe<&2, String> <- F.read(dir ++ "/" ++ hd) rest : List<&2, K.Source> <- files.under(dir, tl) return K.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/pkg/pkg.bend&name=Source