def slurp.cut

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

import ezx@1.11.0.0/src/io/file.bend as File
import 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})

Uses (5)

Used by (1)