I was wondering how the following code evaluates to 3.
(define (foo y) ((lambda (x) y) ((lambda (y)(* y y)) y)))
(foo 3)
I have been looking at it for a while and cannot seem to understand why the evaluation does not result in 9. Could someone provide a detailed step by step instruction on how this evaluates to 3?