chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] parameterize-from-alist


From: Alaric Snell-Pym
Subject: Re: [Chicken-users] parameterize-from-alist
Date: Sun, 15 Jul 2007 21:42:01 +0100


On 10 Jul 2007, at 2:12 am, Ivan Shmakov wrote:

"AS" == Alaric Snell-Pym <address@hidden> writes:

[...]

AS> He suggested I ask on The List, so here it is. Is there a way to
AS> write parameterize-from-alist without eval hackery, or shall I
just
AS> use the wings dynamic environment?

       'Course.  However, I'd recommend for it to be implemented as a
       function, not as a macro.

(define (parameterize-from-alist alist thunk)
 (let loop ((alist alist))
   (if (not (null? alist))
       (parameterize ((caar alist) (cdar alist))
         (loop (cdr alist)))
       (thunk))))

But (caar alist) will return a symbol, not a parameter object?

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/?author=4






reply via email to

[Prev in Thread] Current Thread [Next in Thread]