[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] define not using define
From: |
Graham Fawcett |
Subject: |
Re: [Chicken-users] define not using define |
Date: |
Fri, 25 Jan 2008 09:31:28 -0500 |
On Jan 25, 2008 5:19 AM, minh thu <address@hidden> wrote:
> Hi,
>
> Is it possible to register symbols in Chicken, just as a global
> (define ...) would do from arbitrary code?
>
> I'd like to be able to write (setting 'color '#f32(1 0 0 0)) and have
> the same effect
> than a (define color (make-parameter '#f32(1 0 0 0)) unless the color
> procedure
> already exists.
How about runtime evaluation? Something like
(define (setting symbol value)
(eval `(set! ,symbol ,value)))
G