def slurp.cut
import ezx@1.11.0.0/src/io/file.bend as Fileimport Base
11# an empty chunk means the end of the file
12def slurp.cut(chunk: String, file: File, acc: String, rest: File -> String -> IO(String)) -> IO(String):
13 match chunk:
14 case SNil{}:
15 slurp.end(file, acc)
16 case SCon{c, t}:
17 rest(file, acc ++ SCon{c, t})