Hi Alex,

I am wondering whether it would be possible (and worth it) to extend
'do' function to accomodate the following scenario:

: (do2 (I . 5) (print I) "finished")
12345-> "finished"
: (do2 (I . -5) (print I) "finished")
54321-> "finished"

Here is the prototype code but that would have to be integrated in the
C function...

(de do2 A
   (bind (list (car A) (cons 'N (cdar A)))
      (set (caar A) (if (gt0 N) 1 (abs N)))
      (do (abs N)
         (prog1
            (run (cdr A))
            (if (gt0 N)
               (inc (caar A))
               (dec (caar A)))))))

(run (cdr A)) should probably be (run (cdr A) 123 (list (caar A)))
using the new 'run' convention.  However, I am not sure what level it
should be (not 123 really)...  How do you count how many frames need
to be skipped in such cases to get to the scope out of the function?

Thanks,

Tomas
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to