
25 Jan
2013
25 Jan
'13
4:19 p.m.
On Fri, Jan 25, 2013 at 11:05 AM, Pete Bartlett
It would be neat if I could somehow write and “adaptor accumulator” that took this stream of optionals and then, if they are not empty, pass them to an underlying accumulator.
My impulse is to suggest implementing an iterator (or range) adapter instead, to skip the items you don't have and dereference the ones you do.
(we might also define another accumulator that just counts the number of “bad” samples.
I admit I don't know how to do that in a single pass using iterator/range adapters instead of what you propose.