[plt-scheme] dot notation issue
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>