From ... From: Erik Naggum Subject: Re: recursive function that returns true/false (newbie stuff) Date: 1998/01/25 Message-ID: <3094699721088415@naggum.no>#1/1 X-Deja-AN: 319014021 References: <6aei0l$7ko$1@newsreader.wustl.edu> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * Kevin Goodier | My general question: is this the correct way to implement the return | values for is-palindrome? Am I returning the correct "booleans" ('T and | 'NIL), in the correct places, and is the recursive part of this | implemented efficiently? well, (EQUAL LIST (REVERSE LIST)) would be a lot more efficient, as well as answering the question right away, although it, too, does two list traversals. can you determine whether a list is palindromatic in one pass, or do you need at least two? how about a vector? how many passes do _you_ make over the list? also consider whether "x" is a degenerate palindrome and needs a special case, or does it just help efficiency to add one? #: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/