Defining AVERAGING clause

Robert Goldman rpgoldman at sift.info
Tue Mar 13 14:49:35 UTC 2018


I was going to define an `AVERAGING` collector clause for iterate, but 
I'm not sure how to do it.  The obvious thing, it seemed to me, would be 
to sum the values as I go along, and count them, and then divide the sum 
by the count when leaving the loop.

But the examples for `DEFMACRO-CLAUSE` in the manual do all of their 
work while iterating, and there doesn't seem to be an "at-end" hook.  Is 
the kind of thing I would like feasible, and if so, how is it to be 
done?

thanks!
r
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/iterate-devel/attachments/20180313/855f767c/attachment.html>


More information about the iterate-devel mailing list