[plt-scheme] HtDP ex 11.2.4
No:
> (empty? 'a)
false
-- Matthias
On Feb 17, 2006, at 7:47 PM, Prabhakar Ragde wrote:
> 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
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme