silly.scm 360 B

12345678910111213
  1. ; Part of Scheme 48 1.9. See file COPYING for notices and license.
  2. ; Authors: Richard Kelsey, Jonathan Rees
  3. (define (reverse-list->string l n)
  4. ;; Significantly faster than (list->string (reverse l))
  5. (let ((s (make-string n #\x)))
  6. (let loop ((i (- n 1)) (l l))
  7. (if (< i 0) s (begin (string-set! s i (car l))
  8. (loop (- i 1) (cdr l)))))))