12345678910111213141516171819202122232425262728293031 |
- #!r6rs
- ;;; utils.sls --- utilities for `include-file'
- ;; Copyright (C) 2010 Andreas Rottmann <a.rottmann@gmx.at>
- ;; This program is free software, you can redistribute it and/or
- ;; modify it under the terms of the MIT/X11 license.
- ;; You should have received a copy of the MIT/X11 license along with
- ;; this program. If not, see
- ;; <http://www.opensource.org/licenses/mit-license.php>.
- ;;; Commentary:
- ;;; Code:
- (library (arguile lib private include utils)
- (export string-join)
- (import (rnrs base))
-
- (define (string-join lst sep)
- (if (null? lst)
- ""
- (let loop ((result '()) (lst lst))
- (if (null? lst)
- (apply string-append (cdr (reverse result)))
- (loop (cons (car lst) (cons sep result))
- (cdr lst))))))
- )
|