<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">FWIW:<div><br></div><div>I believe the style guide suggests that 'cond' should be used instead of 'if' when a clause requires more than one expression. The newer Racket versions of 'cond' also permit internal defines. 'Begin' is unnecessary.<div><br></div><div>rac</div><div><br><div><br></div><div><br><div><div>On Mar 21, 2012, at 3:37 PM, Joe Gilray wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Rodolfo,<div><br></div><div>In this case though, printf will never return #f so "and" is equivalent to "begin", right?</div><div><br></div><div>-Joe</div><div><br></div><div><br><br><div class="gmail_quote">
On Wed, Mar 21, 2012 at 2:30 PM, Rodolfo Carvalho <span dir="ltr">&lt;<a href="mailto:rhcarvalho@gmail.com">rhcarvalho@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">On Wed, Mar 21, 2012 at 17:21, Joe Gilray <span dir="ltr">&lt;<a href="mailto:jgilray@gmail.com" target="_blank">jgilray@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi Tim,<div><br></div><div>Thanks for sharing your code.</div><div><br></div><div>Quick, newby question: why do you use "and" instead of "begin" in your progress function?<br></div></blockquote><div><br>


</div><div><br></div></div><div>If you are used to run commands from bash you may do things like</div><div><br></div><div>command1 &amp;&amp; command2 &amp;&amp; command3</div><div><br></div><div>e.g.: &nbsp;mkdir somedir &amp;&amp; cd somedir &amp;&amp; git clone ...</div>


<div><br></div><div><br></div><div>Why people do that? Simply put, all of the commands after a `&amp;&amp;' are only run if the commands before executes fine (return code 0).</div><div>So "git clone" will be executed only if I could create a dir and cd to it. It will not be executed if I don't have permissions to create a dir.</div>


<div><br></div><div>Using "and" is like using "&amp;&amp;" in bash, while "begin" is equivalent of separating the commands with ";".</div><div><br></div><div>More on short-circuit evaluation:&nbsp;<a href="http://en.wikipedia.org/wiki/Short-circuit_evaluation" target="_blank">http://en.wikipedia.org/wiki/Short-circuit_evaluation</a></div>


<div><br></div><div>HTH,</div><div><br></div><div>Rodolfo</div></div>
</blockquote></div><br></div>
____________________<br> &nbsp;Racket Users list:<br> &nbsp;<a href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a><br></blockquote></div><br></div></div></div></body></html>