def read_all

bolt@1.27.0.0 · src/lsp/files/service.bend:32

import bolt@1.27.0.0/src/lsp/files/service.bend as Service
import Base

32# every path read, in order (a missing file is a None)
33def read_all(~ff: Files, paths: List<&2, String>) -> IO(List<&2, Maybe<&2, String>>):  # noqa: L001 effect accessor
34  match paths:
35    case Nil{}:
36      IO.pure(List<&2, Maybe<&2, String>>, [])
37    case Con{p, rest}:
38      do IO<List<&2, Maybe<&2, String>>>:
39        r : Maybe<&2, String> <- read(ff, p)
40        more : List<&2, Maybe<&2, String>> <- read_all(~ff, rest)
41        return r <> more

Uses (8)

Used by (1)