silly.scm 331 B

1234567891011
  1. ; Copyright (c) 1993-2007 by Richard Kelsey and Jonathan Rees. See file COPYING.
  2. (define (reverse-list->string l n)
  3. ;; Significantly faster than (list->string (reverse l))
  4. (let ((s (make-string n #\x)))
  5. (let loop ((i (- n 1)) (l l))
  6. (if (< i 0) s (begin (string-set! s i (car l))
  7. (loop (- i 1) (cdr l)))))))