From 8d866b6441af9d4cdd8a58d1f194b5cba5971ef1 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 29 Apr 2018 18:34:21 +0200 Subject: [PATCH] mes: string-join: Handle empty list. * module/mes/boot-0.scm (string-join): Handle empty list. --- module/mes/boot-0.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/mes/boot-0.scm b/module/mes/boot-0.scm index 062ba6f9..b4c10752 100644 --- a/module/mes/boot-0.scm +++ b/module/mes/boot-0.scm @@ -200,8 +200,9 @@ (list 'load (list string-append %moduledir file))) (define (string-join lst infix) - (if (null? (cdr lst)) (car lst) - (string-append (car lst) infix (string-join (cdr lst) infix)))) + (if (null? lst) "" + (if (null? (cdr lst)) (car lst) + (string-append (car lst) infix (string-join (cdr lst) infix))))) (include-from-path "mes/module.mes")