[help] sum of list
Hi, Everyone,
I am starting to learn Lisp. Could you please bother to help me on the following question? Thank you!
I plan to write a function that returns the sum of all non-nil numbers in a list. However, it does not work as intended. Could you please tell me what is the problem and how to correct it? Thank you so much .
The function I wrote is as follows:
(defun (summit ( lst) (remove nil lst) (apply #' + lst))
Thanks! :-)