def write.opened

ezx@1.11.0.0 · src/io/file.bend:115

import ezx@1.11.0.0/src/io/file.bend as File
import Base

115# the text written to an opened file
116def write.opened(res: Result<&1, &1, U32 & String, File>, text: String) -> IO(Bool):
117  match res:
118    case Fail{_e}:
119      IO.pure(Bool, False{})
120    case Done{file}:
121      do IO<Bool>:
122        w : File & Result<&1, &1, U32 & String, Unit> <- File.write(file, text)
123        write.done(w)

Uses (12)

Used by (1)