<div>Yes, and it is quite easy. All you need to do is think about it and change the order of the cond a bit...</div>
<div>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 ;-).</div>
<div>Just a note: If you change the #t in that last cond case to else, it would look a bit better.</div>
<div> </div>
<div>The insomniac.<br> </div>
<div><span class="gmail_quote">On 10/9/05, <b class="gmail_sendername">George Herson</b> <<a href="mailto:gherson@snet.net">gherson@snet.net</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I'm working thru The Little Lisper, 2nd Ed. Exercise<br>6.5 (p115) asks: Can one can change<br><br>(define member*
<br>(lambda (a l)<br>(cond<br> [(null? l) #f]<br> [(atom? (car l)) (or (eq? (car l) a)<br> (member* a (cdr l)))]<br> [#t (or (member* a (car l))<br> (member* a (cdr l)))])))<br><br>so that query
<br><br>(member*<br> 'chips<br> '((potato) (chips ((with) fish) (chips))))<br><br>finds the last chips first?<br><br>Would that be a yes or would that be a no?<br><br>(This is not assigned homework.)<br><br>thx,<br>George Herson
<br>_________________________________________________<br>For list-related administrative tasks:<br><a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>
</blockquote></div><br>