join | ||
---|---|---|
Prev | Next |
(join slist #!optional (space " "))
Given a list of strings and a space string, returns the string that results from joining all the strings in the list together, separated by space.
The list of strings.
The string to place between each member of the list. Defaults to a single space.
David Carlisle
(define (join slist #!optional (space " ")) ;; Joins a list of strings together (letrec ((loop (lambda (l result) (if (null? l) result (loop (cdr l) (cons space (cons (car l) result))))))) (if (null? slist) "" (apply string-append (cons (car slist) (loop (reverse (cdr slist)) '() ))))))
Prev | Home | Next |
ipreced | Up | length-string-number-part |