<br><br><div class="gmail_quote">On Fri, Feb 6, 2009 at 3:46 PM, Lisa Gandy <span dir="ltr"><<a href="mailto:redlmg98@hotmail.com">redlmg98@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<a href="mailto:plt-scheme@list.cs.brown.edu" target="_blank">Hi,</a><br>I have the following code..<br><br>(define (same-parity p . x)<br> (define ind (remainder p 2))<br> (cond ((null? x) '())<br> ((= ind (remainder (car x) 2))<br>
(cons (car x) (same-parity p (cdr x))))<br> (else (same-parity p (cdr x)))))<br></div></blockquote><div><br>Try (apply same-parity p (cdr x)).<br><br>Cheers,<br>yc<br><br></div></div><br>