How can I pass a variable by reference in scheme?
An example of the functionality I want:
(define foo (lambda (&x) (set! x 5))) (define y 2)
lambda!
(define (foo getx setx) (setx (+ (getx) 5))) (define y 2) (display y)(newline) (foo (lambda () y) (lambda (val) (set! y val))) (display y)(newline)