I was wondering how you would go about defining your own let expression in Scheme (I'm very new to scheme). I want it to look like (mylet id expr1 expr2) where id is bound to expr1's value and used in expr2. I think it would be something along the lines of:
(define (mylet x a body)
((lambda (x) body) a) )
but that isn't working.
When I try
(mylet x 4 (* x 4))
I get the following error:
x: undefined; cannot reference undefined identifier.
What am I doing wrong?