From 3b65092267029c5109920aa7d3d95876f1654b49 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Thu, 20 Jun 2024 17:50:01 -0400 Subject: [PATCH] add clause for `join` with empty list and separator --- prelude.ld | 1 + 1 file changed, 1 insertion(+) diff --git a/prelude.ld b/prelude.ld index 936a34b..fefbf93 100644 --- a/prelude.ld +++ b/prelude.ld @@ -326,6 +326,7 @@ fn join { ([]) -> "" ([str as :string]) -> str (strs as :list) -> join (strs, "") + ([], separator as :string) -> "" ([str as :string], separator as :string) -> str ([str, ...strs], separator as :string) -> fold ( fn (joined, to_join) -> concat (joined, separator, to_join)