RosettaCodeData/Task/Rot-13/Common-Lisp/rot-13-3.lisp

10 lines
218 B
Common Lisp

(defconstant +a+ "AaBbCcDdEeFfGgHhIiJjKkLlMmzZyYxXwWvVuUtTsSrRqQpPoOnN")
(defun rot (txt)
(map 'string
#'(lambda (x)
(if (find x +a+)
(char +a+ (- 51 (position x +a+)))
x))
txt))