(defun func (lst)
(let ((y 0))
(dolist (x lst y)
(setq y (+ y x)))))

(defun func (lst)
(apply #'+ lst))