[plt-scheme] dot notation issue

From: YC (yinso.chen at gmail.com)
Date: Fri Feb 6 18:52:41 EST 2009

On Fri, Feb 6, 2009 at 3:46 PM, Lisa Gandy <redlmg98 at hotmail.com> wrote:

>  Hi, <plt-scheme at list.cs.brown.edu>
> I have the following code..
>
> (define (same-parity p . x)
>     (define ind (remainder p 2))
>     (cond ((null? x) '())
>           ((= ind (remainder (car x) 2))
>           (cons (car x) (same-parity p (cdr x))))
>           (else (same-parity p (cdr x)))))
>

Try (apply same-parity p (cdr x)).

Cheers,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090206/5b6e9343/attachment.html>

Posted on the users mailing list.