From: Gerard R. <g.r...@fr...> - 2012-03-03 14:53:42
|
hello, The function middadd works fine: (SBCL 1.0.40.0.debian) (defun middadd (x) (setf (second x) (+ (second x) 1))x) but this one : (defun middaddlet (x) (let* ((second x) (+ (second x) 1)) x)) gives when I do: (load "middadd1.lisp") in: LAMBDA NIL ; (LET* ((SECOND X) (+ (SECOND X) 1)) ; X) ; ; caught ERROR: ; The LET* binding spec (+ (SECOND X) 1) is malformed. ; (SB-INT:NAMED-LAMBDA MIDDADDLET ; (X) ; (BLOCK MIDDADDLET ; (LET* ((SECOND X) (+ # 1)) ; X))) ; ==> ; #'(SB-INT:NAMED-LAMBDA MIDDADDLET ; (X) ; (BLOCK MIDDADDLET ; (LET* ((SECOND X) (+ # 1)) ; X))) ; ; caught STYLE-WARNING: ; The variable X is defined but never used. ; ; compilation unit finished ; caught 1 ERROR condition ; caught 1 STYLE-WARNING condition How can I make the function middaddlet work correctly with let ? Thanks in advance. -- Gérard |