; your code goes here
(defun same-parity (n list)
  (loop for x in list
     with parity = (rem n 2)
     if (= (rem x 2) parity)
     collect x))

(defvar x (list 1 2 3 4 5 6 7 8 9 10))

(print (same-parity 3 x))
(print (same-parity 2 x))
