Fs.read.sized2: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/fs.bend as Fs Lines 61-66 of cswap-bend-cli@0.1.0.0/fs.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/fs.bend&start_line=61&end_line=66 import Base def read.sized2(f: File, r: Res(U32)) -> IO(Res(String)): match r: case Fail{e}: IO.bind(Unit, Res(String), File.close(f), u => IO.pure(Res(String), Fail{e})) case Done{n}: IO.bind(File & Res(String), Res(String), File.read(f, n), read.done) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.close https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.read 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=cswap-bend-cli@0.1.0.0/fs.bend&name=Res https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs.bend&name=read.done