On Mon, Feb 02, 2015 at 11:55:12AM -0700, Alexej Magura wrote: > AFAICT that just defines a symbol to itself, and only then if you run: > > (define foo 1) > (define foo (unintern 'foo)) > (eq? foo |foo|) => #t > > But, as I said, that only defines 'foo as |foo|: it doesn't > /undefine/ the symbol, and it needs to have side-effects, since the > CL /unintern/ AFAIK effects the targeted package, or in our case > module. > > After uninterning /foo/, if I were to enter foo into the REPL to be > evaluated, it would throw an unbound variable exception.
I wasn't aware of that CL behaviour. IIUC that's actually conflating two different things: creating an uninterned symbol and "unbinding" an interned symbol. I don't know of a way to unbind a variable through Scheme, but you can set the symbol's value slot (0) to C_SCHEME_UNBOUND in C. This has to go with the warnings "Don't try this at home", and "this voids your warranty". :) Cheers, Peter
signature.asc
Description: Digital signature
_______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users