def with_overwrite

cswap-bend-cli@0.1.0.0 · cliops.bend:63

import cswap-bend-cli@0.1.0.0/cliops.bend as Cliops
import Base
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/act.bend as Act

63# Run `first`; when it stops at an occupied slot (code 10) ask on stdin and,
64# on a yes, run `retry` (the same call, told to overwrite). With `noin` the
65# occupied slot is the error.
66def with_overwrite(first: Act.of(String), retry: Act.of(String), +noin: Bool) -> Act.of(String):
67  IO.bind(Fs.Res(String), Fs.Res(String), first, r => ow.handle(r, retry, noin))

Uses (6)

Used by (2)