The Modular DocBook Stylesheets
PrevDSSSL LibraryNext

constant-list

Name

constant-list — Returns a list of the specified value

Synopsis

(constant-list value length)

Description

Return a list containing length elements, each of value.

Example

(constant-list 0 4) returns (0 0 0 0)

Author

Norman Walsh, <norm@berkshire.net>

Source Code

(define (constant-list value length)
  ;; Returns a list of the specified value
  (let loop ((count (abs length)) (result '()))
    (if (equal? count 0)
	result
	(loop (- count 1) (append result (list value))))))

PrevHomeNext
component-child-numberUpcopy-string