title: Using break from loop in Racket
body: <p>I can use "while" loop in Racket with code from <a href="https://stackoverflow.com/questions/10968212/while-loop-macro-in-drracket">While Loop Macro in DrRacket</a></p>
  
  <pre><code>(define-syntax-rule (while-loop condition body ...)   
    (let loop ()
      (when condition
        body ...
        (loop))))
  </code></pre>
  
  <p>However, I want to use break inside an infinite loop as follows: </p>
  
  <pre><code>(define (testfn)
    (define x 5)
    (while-loop #t          ; infinite while loop; 
      (println x)
      (set! x (sub1 x))
      (when (&lt; x 0)
         (break))))         ; HOW TO BREAK HERE; 
  </code></pre>
  
  <p>How can I insert break in above indefinite while loop? Thanks for your comments/answers.</p>