def read.all

ezx@1.11.0.0 · src/lock/run.bend:68

import ezx@1.11.0.0/src/lock/run.bend as Run
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 W

68# every listed path, read
69def read.all(ps: List<&2, String>) -> IO(List<&2, W.Source>):
70  match ps:
71    case []:
72      IO.pure(List<&2, W.Source>, [])
73    case +h <> t:
74      do IO<List<&2, W.Source>>:
75        m : Maybe<&2, String> <- F.read(h)
76        rest : List<&2, W.Source> <- read.all(t)
77        return W.Source{h, F.text_of(m)} <> rest

Uses (9)

Used by (1)