Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@dvanhorn /1.rkt secret
Created Aug 27, 2011

#lang racket
(define str
"g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.")
(define (translate-char c)
(cond [(char-alphabetic? c)
(cond [(char=? #\z c) #\b]
[(char=? #\y c) #\a]
[else (integer->char (+ 2 (char->integer c)))])]
[else c]))
(define (translate-string s)
(apply string (map f (string->list s))))
(translate-string str)
(translate-string "map")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.