The documentation for 'if' is here <a href="http://docs.racket-lang.org/reference/if.html?q=if">http://docs.racket-lang.org/reference/if.html?q=if</a><br><br>Here's a slightly modified example from the doc using 'if':<br>
<br><span class="RktPn">(if (positive? -5) <br> (error "shouldn't get here") <br> </span>(display "hi")<span class="RktPn">)</span><br><br>You might want to consider the 'when', documented here <a href="http://docs.racket-lang.org/reference/when_unless.html?q=when">http://docs.racket-lang.org/reference/when_unless.html?q=when</a><br>
<br>And here's an example from the doc using 'when':<br><br>(when (positive? -5)<br> (display "hi"))<br><br>Cheers,<br><br>Kieron.<br><br>