guile-devel
[Top][All Lists]
Advanced

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

Re: A proper tail version of with-fluids


From: Ludovic Courtès
Subject: Re: A proper tail version of with-fluids
Date: Fri, 04 Jan 2013 00:36:42 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

Hi Stefan,

Stefan Israelsson Tampe <address@hidden> skribis:

> (define f (lambda (n) (if (= n 0) (fluid-ref a) (with-fluids ((a n)) (f (-
> n 1))))))
>
> with the modified VM:
> scheme@(guile-user)> (f 10000000)
> $2 = 1
>
> with the old VM, it craches. It works!

Hmm, I can’t see how ‘with-fluids’ or ‘parameterize’ could be
tail-recursive given that it uses ‘dynamic-wind’.  Am I missing
something?

Ludo’.




reply via email to

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