[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Me no understand scoping

From: Neil Jerram
Subject: Re: Me no understand scoping
Date: Thu, 31 Jul 2008 22:37:19 +0100

2008/7/31 Maciek Godek <address@hidden>:

> Here comes another one:
> Suppose I want to define a variable, but I don't know its name
> -- it is contained in another variable. For example:
> (define a 'b)
> I want to assign a value to the symbol "contained" in a.
> (that would be b in this example). The problem is that "define"
> quotes its first argument. How to achieve it?

I'm not so sure about this one, but I think that

(eval `(define ,(car a) 1))

should work.

Now, stepping back a bit - and purely out of interest - did you
mention before why you are doing these strange things?  Is it your way
of exploring and learning, or is there (also) a specific requirement?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]