<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Robby,<div><br></div><div>Yes I am sure, I copy pasted the exact code. Here are the screenshots for your reference. You can also verify the version information in the interactive console.</div><div><br></div><div><a href="http://gallery.me.com/itsgg/100023/mac">http://gallery.me.com/itsgg/100023/mac</a> (No exception)</div><div><a href="http://gallery.me.com/itsgg/100023/linux1">http://gallery.me.c…/itsgg/100023/linux1</a> (Exception)</div><div><a href="http://gallery.me.com/itsgg/100023/linux2">http://gallery.me.c…/itsgg/100023/linux2</a> (Commented letrec block. No exception)</div><div><br></div><div>Cheers,</div><div>Ganesh Gunasegaran</div><div><br><div><div>On 17-Sep-2009, at 9:54 AM, Robby Findler wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Are you sure you ran exactly the same code and you were using exactly<br>the same version? At that level, there is no difference between the<br>two versions (ie, it is the same source code that implements cons<br>etc).<br><br>Robby<br><br>On Wed, Sep 16, 2009 at 11:15 PM, Ganesh Gunasegaran<br><<a href="mailto:ganesh.gunas@gmail.com">ganesh.gunas@gmail.com</a>> wrote:<br><blockquote type="cite">Hi Jens,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks for the explanation. Couple of questions<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- The same code doesn't throw the mcar exception in Mac OSX version of<br></blockquote><blockquote type="cite">DrScheme(4.2.1). The exception is thrown only in the linux version of<br></blockquote><blockquote type="cite">DrScheme(4.2.1).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- Even in the linux version of DrScheme, the exception is not thrown if I<br></blockquote><blockquote type="cite">comment the unrelated letrec block.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Even if shadowing occurs as you suggested, there is inconsistency across<br></blockquote><blockquote type="cite">operating systems.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Cheers,<br></blockquote><blockquote type="cite">Ganesh Gunasegaran.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">#lang scheme<br></blockquote><blockquote type="cite">(require rnrs/base-6)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(letrec ([my-sum (lambda (l)<br></blockquote><blockquote type="cite"> (if (null? l)<br></blockquote><blockquote type="cite"> 0<br></blockquote><blockquote type="cite"> (+ (car l) (my-sum (cdr l)))))])<br></blockquote><blockquote type="cite"> (my-sum '(1 2 3 4)))<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(define my-sum<br></blockquote><blockquote type="cite"> (lambda (l)<br></blockquote><blockquote type="cite"> (if (null? l)<br></blockquote><blockquote type="cite"> 0<br></blockquote><blockquote type="cite"> (+ (car l) (my-sum (cdr l))))))<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 16-Sep-2009, at 11:29 PM, Jens Axel Søgaard wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">2009/9/16 Jens Axel Søgaard <<a href="mailto:jensaxel@soegaard.net">jensaxel@soegaard.net</a>>:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">[sent privately too by accident]<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">2009/9/16 Ganesh Gunasegaran <<a href="mailto:ganesh.gunas@gmail.com">ganesh.gunas@gmail.com</a>>:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Hi All,<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I am very new to Scheme<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">What is wrong with the following code?<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">--------------------------------------------------------------------------------------------------------------------------------<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">#lang scheme<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">(require rnrs/base-6)<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">One more thing:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Since the entire rnrs/base-6 is required some functions from "scheme"<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">such as car, cdr, cons are shadowed by their bindings in rnrs/base-6.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">In particular in rnrs the identifier car is bound to the same value<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">as the identifier mcar is bound to in "scheme'. That is, after the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">require line, when you write "car" you are actually calling "mcar".<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">This might we somewhat confusing, for new Scheme users, so<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">here is a practical advise:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Stick either to the "scheme" language, and if you need a particular<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">function from rnrs use the documentation to figure out, what<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">is called in PLT Scheme (in 99% of the cases the names<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">are the same).<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Jens Axel Søgaard<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_________________________________________________<br></blockquote><blockquote type="cite"> For list-related administrative tasks:<br></blockquote><blockquote type="cite"> <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br></blockquote><blockquote type="cite"><br></blockquote></div></blockquote></div><br></div></body></html>