(defun acumulatorio (combina func inicial a suc b) (if (> a b) inicial (funcall combina (funcall func a) (acumulatorio combina func inicial (funcall suc a) suc b))))(defun somatorio (func a b) (acumulatorio (function +) func 0 a (function 1+) b))
(defun produtorio (func a b) (acumulatorio (function *) func 1 a (function 1+) b))