Here’s my version of palindrome for lisp problems 99 no 06 found here

(defun last1 (lst)

  (car (last lst)))

(defun palin1 (lst)

       (if (equal nil lst)

       t

       (let ((start (first lst)) (finish (last1 lst)))

         (if (equal start finish)

         (palin1 (rest (butlast lst)))

         nil))))

 


Comments




Leave a Reply