|
Boost : |
Subject: Re: [boost] [fusion] Any chance we can incorporate more folds?
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-08-20 18:43:02
Zitat von David Sankel <camior_at_[hidden]>:
> I've implemented, in particular, foldr1:
>
> template<
> typename Sequence,
> typename State,
> typename F
>>
> typename result_of::foldr1<Sequence, F>::type foldr1(
> Sequence& seq, F const& f);
>
> Semantics:
>
> Equivalent to f(....f(f(e1,e2),e3)...) where e1 ...eN are the elements
> of seq.
isn't this equivalent to
fold(pop_front(seq),front(seq),f) ?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk