<div>thank you for your replying</div><div>does call/cc always working with let/ec?</div><div>when it comes to compare with your code, it looks like..</div><div>call/cc is meaning of "get out of this function and evaluate next function and comeback (to inside of let/ec) for evaluate rest of the code"</div>
<div>is it right?</div><div><br></div><div>if so, I don't understand why </div><div><br></div><div>following code does not working properly</div><div>#lang scheme</div><div><br></div><div>(require racket/gui)</div><div>
<br></div><div>(define (aa) #t #f "11")</div><div><br></div><div>(dynamic-wind</div><div> (lambda () (display "in "))</div><div> (lambda ()</div><div> (display "pre ")</div><div> (let/ec out</div>
<div> </div><div> (display (call/cc out)))</div><div> (display "1")</div><div> (display "2")</div><div> (display "3")</div><div> )</div><div> (lambda () (display "out ")))</div>
<div><br></div><div>but the following code works weird</div><div>#lang scheme</div><div>(require racket/gui)</div><div>(define (aa) #t #f "11")</div><div>(dynamic-wind</div><div> (lambda () (display "in "))</div>
<div> (lambda ()</div><div> (display "pre ")</div><div> (let/ec out</div><div> (display (call/cc out)))</div><div> (display "1")</div><div> (display "2")</div><div> (display "3")</div>
<div> "1")</div><div> (lambda () (display "out ")))</div><div><br></div><br><div class="gmail_quote">2010년 10월 18일 오후 7:59, Jos Koot <span dir="ltr"><<a href="mailto:jos.koot@telefonica.net">jos.koot@telefonica.net</a>></span>님의 말:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Compare yoiur code with:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">#lang scheme</font></span></div><span><font color="#0000ff" size="2" face="Arial">
<div dir="ltr" align="left"><br>(require racket/gui)</div>
<div dir="ltr" align="left"><br><div class="im">(dynamic-wind<br> (lambda () (display "in
"))<br> (lambda ()<br> (display "pre ")<br></div> (let/ec
out<div class="im"><br> (display (call/cc out)))<br>
#f)<br> (lambda () (display "out ")))</div></div></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Jos</font></span></div><br>
<blockquote style="border-left:#0000ff 2px solid;padding-left:5px;margin-left:5px;margin-right:0px" dir="ltr">
<div dir="ltr" lang="en-us" align="left">
<hr>
<font size="2" face="Tahoma"><b>From:</b> <a href="mailto:users-bounces@racket-lang.org" target="_blank">users-bounces@racket-lang.org</a>
[mailto:<a href="mailto:users-bounces@racket-lang.org" target="_blank">users-bounces@racket-lang.org</a>] <b>On Behalf Of </b>???<br><b>Sent:</b>
18 October 2010 12:41<br><b>To:</b> <a href="mailto:users@racket-lang.org" target="_blank">users@racket-lang.org</a><br><b>Subject:</b>
[racket] how does call/cc and let/ec exactly works?<br></font><br></div><div><div></div><div class="h5">
<div></div>
<div>hello </div>
<div>I am thinking of such a code like..</div>
<div>#lang scheme</div>
<div>(require racket/gui)</div>
<div>(let ([v (let/ec out</div>
<div>
(dynamic-wind</div>
<div> (lambda ()
(display "in "))</div>
<div> (lambda
()</div>
<div>
(display "pre ")</div>
<div>
(display (call/cc out))</div>
<div>
#f)</div>
<div> (lambda ()
(display "out "))))])</div>
<div> (when v (v "post ")))</div>
<div><br></div>
<div>but I still have no idea how </div>
<div>"in pre out in post out " is printed but not "in pre out in pre post out
"</div>
<div>how does call/cc and let/ec exactly works?</div>
<div><br></div></div></div></blockquote>
</blockquote></div><br>