this function is supposed to count the number of times that the element 'a' appears in a list, but is not working:
(defun iter-a_count (lst)
(let ((count 0))
(dolist (x lst)
(if (equal x 'a)
(setf count (+ count 1)))
count )))
This function always returns nil. May I ask where I am going wrong?