Re: macro syntax

2005-11-02 Thread Aurelien Chanudet
ew-func g "g")  On 11/2/05, Ludovic Courtès <[EMAIL PROTECTED]> wrote: Hi,Aurelien Chanudet <[EMAIL PROTECTED] > writes:> (define (find-x f) (cdr (assoc f alist)))You might want to use `assoc-ref' instead of `find-x'.   Thanks for the tip ! > How can I rewrite

macro syntax

2005-10-29 Thread Aurelien Chanudet
Hi all, Please consider the following lines of code : (defmacro-public new-func (f x) `(define (,f) ,x)) (define alist (list (cons "f" 1) (cons "g" 2))) (define (find-x f) (cdr (assoc f alist))) (new-func f (find-x "f")) (new-func g (find-x "g")) How can I rewrite the macro new-func to factor

apply

2005-08-03 Thread Aurelien Chanudet
Hi all, Consider the following code : guile> (define x '( (1 1) (2 2) (3 3) )) guile> (apply (lambda (a b c) (map list a b c) x) ((1 2 3) (1 2 3)) I can't figure out a concise an elegant way to achieve the same result using a lambda form that will work whatever the length of x. Any suggestion ?

Re: setting env variable from Guile

2005-07-29 Thread Aurelien Chanudet
teiro <[EMAIL PROTECTED]> wrote: > On Thu, Jul 28, 2005 at 05:55:59PM +0200, Aurelien Chanudet wrote: > > Hi all, > > > > I have a dynamic library located in a non standard > > place I'd like to load within guile using > > "dynamic-link". Th

setting env variable from Guile

2005-07-28 Thread Aurelien Chanudet
Hi all, I have a dynamic library located in a non standard place I'd like to load within guile using "dynamic-link". The dynamic link editor can be told where to look for the library using an environment variable. Is there a way to set up the environnement variable directly _from_ Guile using for

setting env variable from Guile

2005-07-28 Thread Aurelien Chanudet
Hi all, I have a dynamic library located in a non standard place I'd like to load within guile using "dynamic-link". The dynamic link editor can be told where to look for the library using an environment variable. Is there a way to set up the environnement variable directly _from_ Guile using for