RosettaCodeData/Task/Palindrome-detection/Common-Lisp/palindrome-detection-2.lisp
2023-07-01 13:44:08 -04:00

13 lines
299 B
Common Lisp

;; Project : Palindrome detection
(defun palindrome(x)
(if (string= x (reverse x))
(format t "~d" ": palindrome" (format t x))
(format t "~d" ": not palindrome" (format t x))))
(terpri)
(setq x "radar")
(palindrome x)
(terpri)
(setq x "books")
(palindrome x)
(terpri)