Welcome to the CHICKEN Scheme pasting service

not faster actually added by certainty on Fri Apr 11 08:52:31 2014

(define (palindrome? input)
  (string=? input (string-reverse input)))

(define (faster-palindrome? input)
  (cond
   ((string-null? input) #t)
   (else
    (do ((i 0 (add1 i))
         (j   (sub1 (string-length input)) (sub1 j)))
        ((or (not (char=? (string-ref input i) (string-ref input j)))
             (>= i j))
         (<= j i))))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which relatively recent Scheme report version does CHICKEN _not_ implement?
Visually impaired? Let me spell it for you (wav file) download WAV