<br><br><div class="gmail_quote">On 17 November 2010 03:04, YC <span dir="ltr">&lt;<a href="mailto:yinso.chen@gmail.com">yinso.chen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><div class="gmail_quote"><div class="im">On Tue, Nov 16, 2010 at 11:45 AM, Peter Breitsprecher <span dir="ltr">&lt;<a href="mailto:pkbreits@lakeheadu.ca" target="_blank">pkbreits@lakeheadu.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Logically to me it would make sense, because what the value is returning is list-so-far.<br>Which would turn into <br>(read-list-helper (cons list-so-far list-so-far))<br>then it would pass that newly constructed list to read-list-helper which if it is another close bracket would return list-so-far.<br>



<br>Or is my logic flawed? <br><div><div></div><div><br></div></div></blockquote><div><br> </div></div></div></blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><div class="im"><div></div></div><div>The value returned is not list-so-far, though you can say that it is the list-so-far from the nested read-list-helper.  But the result from the nested read-list-helper and the outer list-so-far are not the same list (i.e. they are not eq?), so it definitely is not (cons list-so-far list-so-far).  </div>
<div class="im">
<div></div></div></div></blockquote><div><br>I knew that it was the result of the internal function call, but that it would have been the value of that variable that is passed to it.  and the other list so far would have been the stacked value  of list so far before the internal function call.  However I still thought it should have worked logically.<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div class="im"><div> </div><div><div><div><div class="gmail_quote">
On 16 November 2010 14:20, Peter Breitsprecher <span dir="ltr">&lt;<a href="mailto:pkbreits@lakeheadu.ca" target="_blank">pkbreits@lakeheadu.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Then for the close brackets, It would just be [(eq? next-char #\)) (list-so-far)]?  I think don&#39;t think that is right but I haven&#39;t tried it yet.<br></blockquote></div></div></div></div><div><br></div></div><div>

list-so-far is a list, not a procedure and hence evaluating it (via putting it in the head position of the parentheses) will result in error.  </div><div><br></div><div>What you want is (reverse list-so-far) in this case. </div>

<div><br></div></div></blockquote><div><br>I just wanted to return the value of list-so-far at that point, and I assumed that was the way to do it.  Putting the reverse in still give me the same errors<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><div></div><div>It would be easier for you to see the behavior of the code if you have the compiler in front of you while you are asking the questions.  Also trace is your best friend for seeing the code visually, especially when dealing with recursions.   See <a href="http://docs.racket-lang.org/reference/debugging.html#%28mod-path._racket/trace%29" target="_blank">http://docs.racket-lang.org/reference/debugging.html#(mod-path._racket/trace)</a> for more details on trace. </div>
</div></blockquote><div><br>I have had the comiler in front of me the past few times, but was trying to understand the logic.  I haven&#39;t used trace, but I had been using debug so I knew where it blew up, but not why.   <br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote">
<div><br></div><div>
The value of keeping these conversations public is that others might be able to help answer your questions while I am away, in which case you are likely to get your answers earlier.   So please be sure to mail through the list going forward.</div>

<div><br></div></div></blockquote><div><br>Sorry I just keep forgetting to reply all.  <br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><div></div><div>Cheers,</div><div>yc</div><div> </div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div>Kurt Breitsprecher</div>
<div>(807) 474-9601</div>
<div><a href="mailto:pkbreits@lakeheadu.ca" target="_blank">pkbreits@lakeheadu.ca</a></div><br>