2 ms·
In s7 scheme: > (define f (let ((x 5)) (lambda (y) (+ x y)))) f > (f 4) 9 > (object->string f :readable) "(let ((x 5)) (lambda (y) (+ x y)))" Main
by moonchild 5y ago
In s7 scheme:
> (define f (let ((x 5)) (lambda (y) (+ x y))))
f
> (f 4)
9
> (object->string f :readable)
"(let ((x 5)) (lambda (y) (+ x y)))"
Maintaining shared references is not necessary to meaningfully print objects. For instance, conses can be printed and read back, even though mutations will not propagate to the versions read.