<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 31, 2010, at 9:19 AM, Hsiu-Hao Tsao wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="font-family: 新細明體; font-size: small; "><div><font size="2" face="新細明體">define y '(1 2 3 4))</font></div><div><font size="2" face="新細明體">>(define dt 1)</font></div><div><font size="2" face="新細明體">>(define foo<br> (lambda (t) (do ((i 0 (+ i 1))) ((> i 3)) (if (and (>= t 0) (and (>= t (* i dt)) (< t (* (+ i 1) dt)))) (list-ref y i) #f))))</font></div></span></span></blockquote></div><br><div>As the docs say: </div><div><br></div><div> "t<span class="Apple-style-span" style="font-family: serif; ">he value of the <span class="ScmSym" style="font-family: monospace; color: rgb(38, 38, 128); "><a href="file:///Users/matthias/plt/doc/reference/for.html?q=do#(form._((lib._racket/private/more-scheme..rkt)._do))" class="ScmStxLink" pltdoc="x" style="text-decoration: none; color: black; font-weight: bold; ">do</a></span> form is <span class="ScmRes" style="font-family: monospace; color: rgb(0, 0, 175); ">#<void>"</span></span></div><div><font class="Apple-style-span" color="#0000AF" face="monospace"><br></font></div><div><font class="Apple-style-span" color="#0000AF" face="monospace">(just F1 on do loop). Just like for loops in C and Java. </font></div></body></html>