Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Caesar-cipher/Common-Lisp/caesar-cipher-2.lisp
Normal file
9
Task/Caesar-cipher/Common-Lisp/caesar-cipher-2.lisp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
(defun caesar-encipher (s k)
|
||||
(map 'string #'(lambda (c) (z c k)) s))
|
||||
|
||||
(defun caesar-decipher (s k) (caesar-encipher s (- k)))
|
||||
|
||||
(defun z (h k &aux (c (char-code h))
|
||||
(b (or (when (<= 97 c 122) 97)
|
||||
(when (<= 65 c 90) 65))))
|
||||
(if b (code-char (+ (mod (+ (- c b) k) 26) b)) h))
|
||||
Loading…
Add table
Add a link
Reference in a new issue