Hi,
And thanks for your attention.
I'd like something in the following flavor :
(define alist (list (cons "f" 1) (cons "g" 2)))
(defmacro-public new-func (f str) some code here to retrieve x from the alist given str `(define (,f) ,x))
(new-func f "f")
(new-func f "f")
(new-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 the macro new-func to factor out find-x in the macro
> definition ?
I don't clearly understand what you mean. Could you rephrase it?
Thanks,
Ludovic.
_______________________________________________ Guile-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/guile-user
