Download code

Jump to: navigation, search

Back to Rot13_(Scheme)

Download for Windows: zip

Download for UNIX: zip, tar.gz, tar.bz2

char-rot13

(define (char-rot13 c)
  (if (and (char-ci>=? c #\a) (char-ci<=? c #\z))
      (integer->char ((if (char-ci<=? c #\m) + -) (char->integer c) 13))
      c))


string-rot13

(define (string-rot13 s)
  (list->string (map char-rot13 (string->list s))))