(define (same-parity fst . rst) (cond ((null? rst) '()) ((or (and (even? fst) (even? (car rst))) (and (odd? fst) (odd? (car rst)))) (cons (car rst) (apply same-parity fst (cdr rst)))) (else (apply same-parity fst (cdr rst)))))