This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun convert (n &optional (cases '((3 . "Pling") (5 . "Plang") (7 . "Plong")))) | |
(let ((results | |
(do* ((cs cases (cdr cs)) | |
(c (car cs) (car cs)) | |
(result (list))) | |
((null cs) (reverse result)) | |
(when (zerop (mod n (car c))) | |
(push (cdr c) result))))) | |
(if results | |
(apply #'concatenate 'string results) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun verse (start &optional (end start)) | |
(format nil | |
"~:{~[~ | |
No more bottles of beer on the wall, ~ | |
no more bottles of beer.~%~ | |
Go to the store and buy some more, ~ | |
99 bottles of beer on the wall.~%~%~ | |
~:;~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am verdammelt on github. | |
* I am mjs (https://keybase.io/mjs) on keybase. | |
* I have a public key whose fingerprint is D16A F8CC 8AF0 D147 C238 F16F AC7E 42A3 C864 6D6D | |
To claim this, I am signing this object: |