(defun fun (n)
(if (> n 0)
(fun (+ n 1) )
n
)
1+2+3+....+n=O(n*n), the comsumption of basic step depends on the once time lambda closure calculation .
(defun fun (n)
(if (> n 0)
(+ n (fun (+ n 1) ) )
n
)
2*(1+2+3+....+n)=O(n*n) 常数因子变大了。