mes: string-join: Handle empty list.

* module/mes/boot-0.scm (string-join): Handle empty list.
This commit is contained in:
Jan Nieuwenhuizen 2018-04-29 18:34:21 +02:00
parent b209378fca
commit 8d866b6441
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -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")