def compact
bend-kit-runner@0.13.0.1 · runner.bend:1522
import bend-kit-runner@0.13.0.1/runner.bend as Runner
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import bend-kit-journal@0.3.0.1/journal.bend as J
1522
1523
1524
1525def compact(~A: Data, ~penc: A -> Bytes.Bytes, r: Runner<A>) -> IO(Ran(A)):
1526 Runner{Log{j, path, limit, base}, +s, p, c, ib, fs} = r
1527 J.Journal{file, +max, end, +ok} = j
1528 do IO<Ran(A)>:
1529 x : Log & Out(Unit) <- compact.if(~A, ~penc, ok, J.Journal{file, max, end, ok}, max, path, limit, base, s)
1530 return compact.done(A, x, s, p, c, ib, fs)