File.write.opened: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/io/file.bend as File Lines 115-123 of ezx@1.11.0.0/src/io/file.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/io/file.bend&start_line=115&end_line=123 import Base # the text written to an opened file def write.opened(res: Result<&1, &1, U32 & String, File>, text: String) -> IO(Bool): match res: case Fail{_e}: IO.pure(Bool, False{}) case Done{file}: do IO: w : File & Result<&1, &1, U32 & String, Unit> <- File.write(file, text) write.done(w) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.write https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/io/file.bend&name=write.done