Hi again,

it occured to me that another implementation approach for Iterate could be 
based on two passes through the body:

1. code-walker to detect all nested gatherers and other special clauses (like 
first-time) which introduce variables to be defined in the outer expansion.

2. Knowing these variables and their associated clauses, have Iterate expand 
into the corresponding outer LET form, and have lots of MACROLET inside that 
refer to them.

(LET bindings...
  init-code...
  (macrolet ((collecting ...) (...))
    body...

Note that this does not solve the problem with the (IN name ...) clause, or 
more generally, how to detect that a given COLLECT clause belongs to which 
Iteration form:
(iter outer (iter inner ... (collect x) or (in outer ... (Collect x))) ...))

This is still hairy at best.

Regards,
        Jörg Höhle
_______________________________________________
iterate-devel site list
iterate-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/iterate-devel

Reply via email to