Task

Compute the sum and product of an array of integers.




(defun sum (xs)
   (if (endp xs)
       0
       (+ (first xs)
          (sum (rest xs)))))
 
(defun prod (xs)
   (if (endp xs)
       1
       (* (first xs)
          (prod (rest xs)))))