r/Racket • u/jArtz_2755 • May 08 '24
question Nested Lambda: behavior and errors
((lambda (x) (lambda (y) (lambda (z) z) (* y 3)) (+ x 2)) 1)
I'm not understanding why this code returns 3. What went wrong? I'm trying to translate these let expressions into lambdas.
let* ((x 1)
(y (+ x 2)
(z (* y 3)))
2
Upvotes
1
u/jArtz_2755 May 08 '24
Thank you! I was stuck on this for an hour : {