;Excerse 2.20
(define (same-parity first-value . other-values)
(let ((match-parity (lambda (a b) (equal? (even? a) (even? b)))))
(if (null? other-values) '()
(if (match-parity first-value (car other-values))
(cons (car other-values) (same-parity first-value (cdr other-values))
(same-parity first-value other-values)))))
is giving me a bunch of weird errors about trying to use lists as integers in the match-parity helper function. I guess this is more of a misunderstanding of the implementation of lists in Scheme than the list concept, but in 2.2 those are mostly equivalent. Help?