Disk.slurp: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/files/disk.bend as Disk Lines 48-56 of bolt@1.27.0.0/src/lsp/files/disk.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/files/disk.bend&start_line=48&end_line=56 import Base # the whole file, read in chunks until one is empty, or the fuel is def slurp(fuel: Nat, file: File, acc: List<&2, U32>) -> IO(Maybe<&2, String>): # noqa: L001 disk effect match fuel: case 0n: slurp.end(file, acc) case 1n+f: do IO>: got : File & Result<&1, &1, U32 & String, List<&2, U32>> <- File.read_bytes(file, 65536) slurp.next(got, acc, fl => a => slurp(f, fl, a)) 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.read_bytes 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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=bolt@1.27.0.0/src/lsp/files/disk.bend&name=slurp.end https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/files/disk.bend&name=slurp.next