DSSSL Library Reference: Part of the Modular DocBook Stylesheet distribution
Prev |  | Next

# 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`.

## Author

David Carlisle

## 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) (cons value  result)))))

Prev | Home | Next
nth-node | Up | list-head