gengyangcai
11/8/2015 9:54:00 AM
This is a function to return the sum of the numbers less than n. ----- (1)
(defun sum (n) ------- (A)
(let ((s 0)) ------- (B)
(dotimes (i n s) ------- (C)
(incf si)))) -------- (D)
It gives this output when I run the code in LispWorks : SUM
Line A : Defun defines function. Sum is the function. n is simply n as defined in (1)
What about lines B, C and D ? What do the terms like let , s , 0 , dotimes , i , n , s , inc. and si mean ?