[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile for lisp set
From: |
Alex Shinn |
Subject: |
guile for lisp set |
Date: |
Sat, 18 Nov 2000 22:02:23 -0500 (EST) |
Hi,
I'm fairly new guile/scheme, and was wondering if I'm missing a simple
way to implement the Lisp set function in guile. The only thing I've
been able to come up with is to translate (set foo bar) as
(eval `(set! ,foo bar) (interaction-environment))
Here the info documentation is misleading, giving eval as a function
of one argument. It also suggests (eval expr) to be equivalent to
(eval2 expr *top-level-lookup-closure*), but in this example I get
guile> (eval2 `(set! ,foo bar) *top-level-lookup-closure*)
ERROR: In procedure apply:
ERROR: Wrong type argument in position 1: #<fluid 2>
ABORT: (wrong-type-arg)
eval.c gives scm_eval taking two arguments, an expression and an
environment, and scm_eval2 taking an object and an env_thunk. Could
someone clarify the distinction between these types, or point me to
the proper place to find out?
Thanks,
Alex
- guile for lisp set,
Alex Shinn <=