def file.slurp.cut

snap@1.4.0.0 · src/file.bend:10

import snap@1.4.0.0/src/file.bend as File
import Base

10# an empty chunk means the end of the file
11def file.slurp.cut(chunk: String, file: File, acc: String, rest: File -> String -> IO(String)) -> IO(String):
12  match chunk:
13    case SNil{}:
14      file.slurp.end(file, acc)
15    case SCon{c, t}:
16      rest(file, acc ++ SCon{c, t})

Uses (5)

Used by (1)