accumulate-filter
appeared in an earlier exercise, but here I just use the built in raclet procedure filter
, which has the same behaviour.
(define (same-parity head . tail) (cons head (filter (if (even? head) even? odd?) tail)))
accumulate-filter
appeared in an earlier exercise, but here I just use the built in raclet procedure filter
, which has the same behaviour.
(define (same-parity head . tail) (cons head (filter (if (even? head) even? odd?) tail)))