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

10 lines
218 B
Common Lisp
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
(defconstant +a+ "AaBbCcDdEeFfGgHhIiJjKkLlMmzZyYxXwWvVuUtTsSrRqQpPoOnN")
(defun rot (txt)
(map 'string
#'(lambda (x)
(if (find x +a+)
(char +a+ (- 51 (position x +a+)))
x))
txt))