I'm failing to append to list for some reason

I’m doing the Allergies and have this code:

(setq allergens '(("eggs" . 1)
                  ("peanuts" . 2)
                  ("shellfish" . 4)
                  ("strawberries" . 8)
                  ("tomatoes" . 16)
                  ("chocolate" . 32)
                  ("pollen" . 64)
                  ("cats" . 128)))

(defun allergic-to-p (score allergen)
  "Returns true if given allergy score includes given allergen."
  (when (>
         (logand
          score
          (or (cdr (assoc allergen allergens :test #'equal)) 0))
         0)
    t))

(defun list (score)
  "Returns a list of allergens for a given allergy score."
  (reduce #'(lambda (acc allergen)
              (if (allergic-to-p score (car allergen))
                  (cons (car allergen) acc)
                  acc))
          allergens
          :initial-value ()))

This produces the correct result but in reverse. So I want to change list to append to the list instead of prepending. To do this I tried to change (cons (car allergen) acc) to (append acc (list (car allergen))). But this gives me an error:

The value
  "eggs"
is not of type
  INTEGER
   [Condition of type TYPE-ERROR]

What am I missing?

(cdr allergen) will return 1 instead of “eggs”. Same goes for all of the elements in 'allergens ’

alternatively, you can choose to not change the code like that and slap the ole’ (reverse before the (reduce and viola, reversed list!
Unless you’re choosing not to be lazy like me…

Not sure if you tried compiling (defun list …) yet, my suggestion is to change it to something like (defun list-allergens …) instead. Unless you(or the exercise)'re doing that because Roswell isn’t too fussy about you overwriting builtin functions like (list, which creates a list that takes lisp forms as arguments and returns all of them as elements

I say all of this because sbcl won’t let me compile a function named (list

Was all of that able to help you with the exercise?