[Python-3000] map, filter, reduce

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jun 2 02:15:24 CEST 2007


Terry Reedy wrote:
> It would generate the sequence of partial reductions (potentially 
> indefinately).
> list(ireduce(summer, 0, range(5)) = [0, 1, 3, 6, 10]
> 
> This is obviously *not* the same as a reduce() which only returns the final 
> value without the intermediate values.

It's sufficiently different that I think calling it
'ireduce' would just be confusing.

It's more like a 'running_reduce' or something.

--
Greg


More information about the Python-3000 mailing list