From a671c4cdc9a31db540b4006abde7fd78e12eaee3 Mon Sep 17 00:00:00 2001 From: Luke Boswell Date: Thu, 22 Feb 2024 19:15:01 +1100 Subject: [PATCH] clean up --- crates/compiler/builtins/roc/Encode.roc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/compiler/builtins/roc/Encode.roc b/crates/compiler/builtins/roc/Encode.roc index 02ae969001..00061c9af3 100644 --- a/crates/compiler/builtins/roc/Encode.roc +++ b/crates/compiler/builtins/roc/Encode.roc @@ -93,17 +93,15 @@ appendWith = \lst, @Encoder doEncoding, fmt -> doEncoding lst fmt ## ## ``` ## expect -## initialList = [1, 2, 3] # Example initial byte list -## valueToAdd = true -## actual = Encode.append initialList valueToAdd Json.format -## expected = [1, 2, 3, ...] # Expected byte list after appending the encoded true value +## actual = Encode.append [] {foo: "Bar"} Json.format ## -## List.length actual > List.length initialList # Check that the list has grown +## # Check that the list has grown +## List.length actual > 0 ## ``` append : List U8, val, fmt -> List U8 where val implements Encoding, fmt implements EncoderFormatting append = \lst, val, fmt -> appendWith lst (toEncoder val) fmt -## Encodes a value into a list of bytes (`List U8`) according to the specified format. +## Encodes a value to a list of bytes (`List U8`) according to the specified format. ## ## ``` ## expect