def any_live

cswap-bend-cli@0.1.0.0 · daemon/sess.bend:337

import cswap-bend-cli@0.1.0.0/daemon/sess.bend as Sess
import Base
import cswap-bend-cli@0.1.0.0/fs.bend as Fs

337def any_live(+dir: String, +names: List<&2, String>) -> IO(Bool):
338  match names:
339    case Nil{}:
340      IO.pure(Bool, False{})
341    case Con{n, t}:
342      IO.bind(Fs.Res(String), Bool, Fs.read_file(dir ++ "/" ++ n), r => IO.bind(Bool, Bool, file_live(r), hit => IO.bind(Bool, Bool, any_live(dir, t), rest => IO.pure(Bool, hit || rest))))

Uses (11)

Used by (2)