[<<][meta][>>][..]
Tue Feb 5 20:12:12 CET 2013
Generalizing fold
Basic idea is that we're mapping many to one. This is not a stream
processor with stream outputs.
In this way, the body of the code could be generalized to an (s,i)->s
map, where s comes from [s], generalized container.
So this is really proper fold:
(i -> s -> s) -> s -> [i] -> s
The trouble is with the type trickery.
What I actually use is fold over a lifted (mapped) operation.
Maybe not so useful, since I really only need fold +.
[Reply][About]
[<<][meta][>>][..]