add clause for join
with empty list and separator
This commit is contained in:
parent
0363d5a091
commit
3b65092267
|
@ -326,6 +326,7 @@ fn join {
|
||||||
([]) -> ""
|
([]) -> ""
|
||||||
([str as :string]) -> str
|
([str as :string]) -> str
|
||||||
(strs as :list) -> join (strs, "")
|
(strs as :list) -> join (strs, "")
|
||||||
|
([], separator as :string) -> ""
|
||||||
([str as :string], separator as :string) -> str
|
([str as :string], separator as :string) -> str
|
||||||
([str, ...strs], separator as :string) -> fold (
|
([str, ...strs], separator as :string) -> fold (
|
||||||
fn (joined, to_join) -> concat (joined, separator, to_join)
|
fn (joined, to_join) -> concat (joined, separator, to_join)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user