secret
Created — forked from dvanhorn/1.rkt

  • Download Gist
1.rkt
Racket
1 2 3 4 5 6 7 8 9 10 11 12 13
#lang racket
(require srfi/13)
 
(define (translate s)
(let* ([a (char->integer #\a)]
[h (for/hash ([c (in-range 26)])
(values (integer->char (+ a c))
(integer->char (+ a (modulo (+ c 2) 26)))))])
(string-map (lambda (c) (hash-ref h c c)) s)))
 
(translate " 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.")
 
(translate "map")

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.