main.rkt
Anonymous
lisp
07/27/2024 6:31 AM
308 B
33
Indexable
(define (foo x)
(let ((x 3)
(y (+ x 2))); uses outer x here
(* x y))
)
(print (foo 2)); prints 12
(display "\n")
(define (bar x)
(+ (let ((x 3))
(+ x (* x 10)))
x); outer x here
)
(print (bar 5)) ; prints 38Editor is loading...
Leave a Comment