- set-procedure-data! PROCEDURE Xprocedure
Changes the data object contained in the extended procedure PROCEDURE to X. Signals an error when PROCEDURE is not an extended procedure.
(define foo (letrec ((f (lambda () (procedure-data x))) (x #f) ) (set! x (extend-procedure f 123)) x) ) (foo) ==> 123 (set-procedure-data! foo 'hello) (foo) ==> hello