[CM] symbol-value (was: 2 questions)

Orm Finnendahl finnendahl@folkwang-hochschule.de
Sat, 19 Oct 2002 20:38:18 +0200


Hi Thorsten,

 are you working in Belfast now?

Am Samstag, den 19. Oktober 2002 um 00:30:07 Uhr (+0200) schrieb
Torsten Anders:

> Am Donnerstag den, 17. Oktober 2002, um 18:00, schrieb Orm Finnendahl:
> >2. How can I access the symbol-value of a symbol?
> 
> Sorry, perhaps I misunderstood something. But so far as I know there is 
> only one symbol binding in Scheme (unlike the seven bindings in CL). 
> Therefore you should not need a symbol-value at all -- just evaluate, as (I 
> did not checked the code...):
> 
> 
> (begin
>     (define *a* 3)
>     (define *b* 23)
>     (define my-seq (list *a* *b*))		; no quote here!
>     (loop for x in my-seq
>       collect x)
>    )
> 

Well, as stated before, that doesn't really help if you're concerned
with dynamic change of the meaning of a certain symbol during the
course of the process. I'd rather store references of things than the
things themselves in the cycle. It could be done with lisp-ref, of
course, but that has other disadvantages.


> BTW: is there a loop in Scheme?

Yes and no. Rick has implemented all or at least most of its
functionality in a file called loop.scm and in the formerly mentioned
slib there is an implementation of loop and, among others, also a
complete implementation of format.

--
Orm