Hi! I need to translate some code from Scheme to Common Lisp. Now, I have something like this:
(defun sum (term a next b)
(if (> a b)
0
(+ (term a) (sum term (next a) b))))
(defun sum-int (a b)
(defun (ident x) x)
(sum ident a 1+ b))
but it produces errors.
* - DEFUN: the name of a function must be a symbol, not (IDENT X)
Help me plese. Thanks
upd original code:
(define (sum term a next b)
(if (> a b)
0
(+ (term a) (sum term (next a) b))))
(define (sum-int a b)
(defun (identity x) x)
(define identity a 1+ b))