Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-07-22 18:02:58

----- Original Message -----
From: "Vesa Karvonen" <vesa.karvonen_at_[hidden]>
> std::accumulate possibly by decades - I don't know when it was first
> Yes, std::accumulate (with binary_op) is basically the same as foldr.
> std::accumulate (and foldr) is a very general function. I recommend that
> find some textbook on functional programming and read the chapter that
> describes list manipulation functions. It is possible to implement most
> sequence algorithms using std::accumulate and trivial adapters. For
> std::transform can be implemented as follows (I'm writing this code from
> top of my head, so it will probably have bugs):

<snip tall skinny code with approx. one identifier per line, names like
"out_ite", and no comments>

Hmm, the above comment says it all. I didn't understand your code. Maybe you
could try again with a more conventional formatting style?

Boost list run by bdawes at, gregod at, cpdaniel at, john at