To add to prior query - here's what I did, but I just think there *must* be a more elegant solution.<br><br>(define (nestfor depth forclause todo)<br> (define (nf depth forclause todo resultant)<br> (for ((x forclause))<br>
(if (= depth 1)<br> (apply todo (append (list x) resultant))<br> (nf (- depth 1) forclause todo (append (list x) resultant)))))<br> (nf depth forclause todo empty))<br><br>(define (nestfortest . args) (displayln args))<br>
<br>(nestfor 3 '(1 2) nestfortest)<br>