Hi Tim, > Mark H Weaver writes: >> I agree that this example indicates a bug in Guile's 'let-values' >> implementation (which was written by Andy Wingo in August 2009), but I >> disagree that it should evaluate to '(9 2 (3) (4)). I think that your >> example should raise an error, because at the point where (set! a 9) is >> found, neither of the 'a' variables are in scope. > > Oops, that `let` should have been a `let*` (Moving the first a into > scope). But if you could verify that what I described is a bug I would > like to propose a patch. I agree that it's a bug, and that if you change 'let' to 'let*' in your previous example, the result should be '(9 2 (3) (4)). I took a quick look, and I believe the fix is simply to swap 'new-var' and 'new-tmp' on line 95 of srfi-11.scm. See the attached patch. Does it fix the problems you're seeing? Thanks, Mark