[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I really do this?
From: |
Carl Witty |
Subject: |
Re: How do I really do this? |
Date: |
10 Mar 2004 14:21:18 -0800 |
On Sat, 2004-03-06 at 10:00, Neil Jerram wrote:
> Bruce Korb <address@hidden> writes:
> > OK. This works:
> >
> > (define sym-name (value-function))
> >
> > So, why doesn't this:
> >
> > (define (string->symbol "sym-name") (val-func))
>
> Because this is the syntax for defining a procedure, and needs to be
> one of:
>
> (define (string->symbol) ...)
> (define (string->symbol ARG1 ...) ...)
> (define (string->symbol . ARGS) ...)
>
> where all the ARGs must be symbols (not strings).
>
> Also, string->symbol is already defined, so why are you trying to
> redefine it?
>
> Perhaps you're not trying to redefine it? In which case, I still
> don't understand what you are trying to do.
I think he's trying to get at something more like
(eval `(define ,(string->symbol "sym-name") ,(val-func)))
(Bruce, hopefully this will help you get an answer to your question.
I'd answer it myself, but it's been too long since I've dealt with
Scheme or Guile...)
Carl Witty
Re: How do I really do this?, Mikael Djurfeldt, 2004/03/10
Re: How do I really do this?, Paul Jarc, 2004/03/10