title: Recursion (or while loops) in Scheme
body: <pre><code>(define (orderedTriples n)
  (set! i n)
  (set! j n)
  (set! k n)
  (while (&gt;= i 0)
     (while (&gt;= j 0)
       (while (&gt;= k 0)
         (printf "(~a, ~a, ~a)" i j k) 
         (set! k (- k 1))) 
       (set! j (- j 1))) 
    (set! i (- i 1))))
  </code></pre>
  
  <p>So my issue is...I am confused as to how to make while loops work in scheme (I'm very new to this so excuse the syntax if I am WAY off). I typed while into here just for the purpose of working through a problem and to show what I am trying to accomplish. Could anyone help me with a simple recursion example or nested recursion?</p>