title: How to set a variable for nested loops?
body: <p>I would like to write a function which accepts as input the number of nested loops which the function will perform. For example, if the input parameter is 3, the function will perform 3 nested loops as follows :</p>
  
  <pre><code>for i=0:[any]
   for j=0:[any]
    for k=0:[any]
  </code></pre>
  
  <p>and if the input parameter is 2, it would be like this :</p>
  
  <pre><code>for i=0:[any]
   for j=0:[any]
  </code></pre>
  
  <p>How can I implement this algorithm ?</p>