[plt-scheme] HtDP ex 11.2.4

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Fri Feb 17 19:47:26 EST 2006

Richard Cleis wrote:

> I unlearned everything that I knew about programming before starting 
> through this book, and it hasn't yet revealed the likes of "list?" or 
> "pair?" or "atom?".  Is this problem solvable with only the now 
> well-worn "empty?" ?

No, because "empty?" can only be applied to something which is "empty" 
or "(cons ...)". But you also have "symbol?", which is sufficient. 
Remember the design recipe: base cases, then recursive cases. You're 
allowed to assume that the input is a deep-list. --PR

Posted on the users mailing list.