[plt-scheme] algorithm qn (newbie)

From: ifconfig nslookup (configurator at gmail.com)
Date: Sun Oct 9 18:54:57 EDT 2005

Yes, and it is quite easy. All you need to do is think about it and change
the order of the cond a bit...
I'm not gonna tell you how, though, because I haven't slept in two days and
I'm pretty much sure I'd get it wrong write now ;-).
Just a note: If you change the #t in that last cond case to else, it would
look a bit better.
 The insomniac.
 On 10/9/05, George Herson <gherson at snet.net> wrote:
> I'm working thru The Little Lisper, 2nd Ed. Exercise
> 6.5 (p115) asks: Can one can change
> (define member*
> (lambda (a l)
> (cond
> [(null? l) #f]
> [(atom? (car l)) (or (eq? (car l) a)
> (member* a (cdr l)))]
> [#t (or (member* a (car l))
> (member* a (cdr l)))])))
> so that query
> (member*
> 'chips
> '((potato) (chips ((with) fish) (chips))))
> finds the last chips first?
> Would that be a yes or would that be a no?
> (This is not assigned homework.)
> thx,
> George Herson
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20051010/7b906916/attachment.html>

Posted on the users mailing list.