def read.found

ezx@1.11.0.0 · src/ws/run.bend:128

import ezx@1.11.0.0/src/ws/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/ws/joint.bend as J

128# every listed ez.toml, read
129def read.found(ps: List<&2, String>) -> IO(List<&2, J.Found>):
130  match ps:
131    case []:
132      IO.pure(List<&2, J.Found>, [])
133    case +hd <> tl:
134      do IO<List<&2, J.Found>>:
135        mm : Maybe<&2, String> <- F.read(hd)
136        rest : List<&2, J.Found> <- read.found(tl)
137        return J.Found{hd, F.text_of(mm)} <> rest

Uses (9)

Used by (2)