custom : (List U8, fmt -> List U8) -> Encoder fmt
where fmt implements EncoderFormatting
Creates a custom encoder from a given function.
expect
custom_encoder = Encode.custom(\bytes, _fmt -> List.append(bytes, 42))
actual = Encode.append_with([], custom_encoder, Core.json)
expected = [42]
actual == expected