def append
import bend-kit-journal@0.3.1.0/journal.bend as Journalimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
391# Appends p as one frame and answers once it is fsynced: Done means durable, under the trust
392# assumptions in README.md. After a Fail the record may or may not survive a reopen.
393def append(j: Journal, p: Bytes.Bytes) -> IO(Journal & Result<&1, &1, U32 & String, Unit>):
394 Journal{file, +max, +end, ok} = j
395 append.ok(ok, file, max, end, p)