Attila Lendvai writes:
>this entire stuff is probably a few minutes for you probably :)
Never. I'm used to double check the code, double-check the macro output (with and without multiple uses etc.). And I did not mention the need to add testcases, nor update the TeX documentation...
Nor use of RCS/darcs/you-name-it.
OTOH, answering e-mails always seems to take little time and little care :-)
>I think a first-iteration-p would be more useful then an entire if-...
>construct. Same for first-time-p
Indeed. You're completely right. Thanks for opening my eyes!
A single predicate integrates even better with the rest of CL (which is one of Iterate's points over LOOP) than another custom IF*.
>
>> BTW, what's the iteration pattern that lead you to ...
Some other question comes to mind: does the need justify a new construct, or are the present ones "good enough"?
I.e. if-first-iteration (non-sharing) could also be done using
(for first-iteration initially t then nil)
Of course, that would not share variables, but in DSL terms, it looks like a growth of non-orthogonal features, with slight variations between each (e.g. yours shares variables, if-first-time allows non-top-level use, if initially then is not as efficient (who cares?) etc.)
> (finally (return `(progn ,@it)))
Why not just
`(progn .,(iter #)) ; read . , if you prefer -- it's not ,.
or `(progn ,@(iter #))
since the "final" clause it never conditional?
Regards,
Jörg Höhle.