Subject: Re: recursive function that returns true/false (newbie stuff)
From: Erik Naggum <clerik@naggum.no>
Date: 1998/01/26
Newsgroups: comp.lang.lisp
Message-ID: <3094767813890115@naggum.no>


* Kevin Goodier
| Efficiently is not a concern for this particular problem, but one thing
| that could help would be to check if the list length is odd.  If so, it
| isn't a palindrome.

* Erik Naggum
| a palindrome is a word (or phrase) that reads the same either way.

  I forgot that the point of that sentence was to say "it makes no
  difference whether something that reads the same both ways has odd or
  even length".  in other words, "v", "eve", "level", etc, are all
  palindromatic.  you code actually catches it, but rather inefficiently,
  which is why I suggested that you might need to detect it.  see for
  yourself what it does with a singleton list...

#:Erik
-- 
The year "98" was new 1900 years ago.  |  Help fight MULE in GNU Emacs 20!
Be year 2000 compliant, write "1998"!  |  http://sourcery.naggum.no/emacs/