Subject: Re: [boost] Boost.RangeEx: contains?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-02-23 09:02:59
Robert Jones wrote:
> I'm sorry if I'm being a bit slow here, but I've lost the thread somewhat!
> "...most algorithms can be implemented in terms of fold.",
> "...what is the fold algorithm?".
> So most algorithms can be implemented in terms of std::accumulate?
std::accumulate is the name of the algorithm that is typically known as
fold in functional programming languages.
> If so I think I can see your point, but surely empty() in terms of std::
> would be a bit obtuse?
It wouldn't be very complicated, just not efficient.
accumulate(rng, true, phoenix::val(false));