Name: Anonymous 2012-06-14 15:55
http://stackoverflow.com/questions/4355827/scheme-r5rs-pass-by-reference/4355854#4355854
(read his follow-up comment)
(read his follow-up comment)
(define (box . initv)
(let [(cell (if (null? initv) '() (car initv)))]
(lambda args
(if (null? args)
cell
(set! cell (car args))))))
(define (unbox b)
(b))
(define (set-box! b new-value)
(b new-value))