Last active
January 3, 2016 22:49
-
-
Save Denommus/8530515 to your computer and use it in GitHub Desktop.
Palindrome program in Common Lisp
This file contains hidden or 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 palindrome (str) | |
| (loop | |
| for i from 0 | |
| for a across str | |
| for b across (reverse str) | |
| always (char= a b) | |
| until (> i (/ (length str) 2)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment