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

"AS" == Alaric Snell-Pym <[EMAIL PROTECTED]> 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




_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to