3 ms·
Here are your snippets in s7, and their output. (let ((x 3)) (let ((y (lambda (z) (lambda () (+ x z))))) (format #t "~a~%" (object->string (y 3) :
by moonchild 5y ago
Here are your snippets in s7, and their output.
(let ((x 3))
(let ((y (lambda (z) (lambda () (+ x z)))))
(format #t "~a~%" (object->string (y 3) :readable))
(format #t "hello~%")
(set! x 5)
(format #t "~a~%" (object->string (y 3) :readable))))
Which gives:
(let ((z 3) (x 3)) (lambda () (+ x z)))
hello
(let ((z 3) (x 5)) (lambda () (+ x z)))
And:
(let ((x 3))
(let ((y (lambda (z) (lambda () (let ((w 0)) (+ w x z))))))
(format #t "~a~%" (object->string (y 3) :readable))
(format #t "hello~%")
(set! x 5)
(format #t "~a~%" (object->string (y 3) :readable))))
Which gives:
(let ((z 3) (x 3)) (lambda () (let ((w 0)) (+ w x z))))
hello
(let ((z 3) (x 5)) (lambda () (let ((w 0)) (+ w x z))))
- taeric 5y agoCool, so it is just more explicit it elisp. Curious if there is a reason for that. And thanks for running these! I can't really give a reason for not installing a scheme to try myself... :(