The Modular DocBook Stylesheets
PrevDSSSL LibraryNext

join

Name

join — Joins a list of strings together

Synopsis

(join slist #!optional (space " "))

Description

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.

slist

The list of strings.

space

The string to place between each member of the list. Defaults to a single space.

Author

Norman Walsh, <norm@berkshire.net>

Source Code

(define (join slist #!optional (space " "))
  ;; Joins a list of strings together
  (let loop ((l slist) (result "") (count 1))
    (if (null? l) 
	result
	(if (> count 1)
	    (loop (cdr l) (string-append result space (car l)) (+ count 1))
	    (loop (cdr l) (string-append result (car l)) (+ count 1))))))

PrevHomeNext
iprecedUplength-string-number-part