wrong to do it
(let ((a 10) (ba)) <- error b)
it is right:
(let* ((a 10) (ba)) b) <- will evaluate to 10.
The error in the first case is related to let semantics.
let* adds new characters to the existing environment, evaluating them internally.
let creates a new environment by evaluating new characters in the current envinronemnt, and the new environment will be deleted at the end of the evaluation of all new characters in order to evaluate the code (let () code).
let* is syntactic sugar for
(let ((a xxx)) (let ((ba)) ...)
while let syntactic sugar for
((lambda (a) ...) val_a)
The second form is much more common , so maybe they thought to give it a shorter name ...
source share