I'm having trouble converting the following from let form to procedure
( let (( a 5)
b (* 5 2))
(let (b (* a b)
(c 10))
(+ b c)))
A let expression is just syntactic sugar for lambda.
For example:
(let ((a 1)
(b 2))
(* a b))
is the same as
((lambda (a b) (* a b)) 1 2)
First, you must fix it.
( let (( a 5)
(b (* 5 2)))
(let ((b (* a b))
(c 10))
(+ b c)))
definition of let is
(let (( variable-name1 value1)
(variable-name2 value2)
(variable-namen valuen))
body)
convert to lambda is
((lambda (variable-name1 variable-name2 variable-namen) body) value1 value2 valuen)