This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Loading and unloading scheme function definitions.
- From: Chris Dean <Chris dot Dean at sokitomi dot com>
- To: "Bhinderwala, Shoeb" <SBhinderwala at wellington dot com>
- Cc: Kawa List <kawa at sources dot redhat dot com>
- Date: Tue, 23 Sep 2003 14:05:34 -0700
- Subject: Re: Loading and unloading scheme function definitions.
- References: <A8A970E739924A4AAAE99901320BFBC6778138@srv_exchg2.wellmanage.com>
Bhinderwala, Shoeb <SBhinderwala@wellington.com> wrote:
> Would you have an example of how to bind an unbind a function
> definition in the Scheme environment from Java.
How about this simple example:
(define my-function (lambda (x) (+ x 1)))
(format #t "~A~%" (my-function 10))
(set! my-function (lambda (x) (+ x 2)))
(format #t "~A~%" (my-function 10))
=>
11
12
This shows how to rebind a definition. As Per says, you need to be
careful if you're using module-static compiled procedures.
Regards,
Chris Dean