[r6rs-discuss] letrec* vs. letrec

Felix pfr6rs at pnkfx.org
Sat Oct 7 20:07:01 EDT 2006


On Oct 7, 2006, at 4:23 PM, Aubrey Jaffer wrote:

> It is my understanding that LETREC* semantics can replace LETREC
> semantics in an R5RS implementation without breaking any behavior
> guaranteed by R5RS.

This understanding may be incorrect.  Al Petrofsky has an expression  
that can observe the difference between R5RS letrec and the common  
implementation of letrec as letrec* (by using, surprise surprise,  
call/cc).  See the following thread:

http://groups.google.com/group/comp.lang.scheme/tree/browse_frm/ 
thread/141d47814c79776b/b646336450487157?rnum=1&q=Widespread+bug+ 
(arguably)+in+letrec+when+an+initializer+returns+twice&_done=%2Fgroup% 
2Fcomp.lang.scheme%2Fbrowse_frm%2Fthread%2F141d47814c79776b% 
2F93641d7d47af2858%3Flnk%3Dst%26q%3DWidespread+bug+(arguably)+in 
+letrec+when+an+initializer+returns+twice%26rnum%3D1% 
26#doc_93641d7d47af2858

-Felix Klock




More information about the r6rs-discuss mailing list