Boost logo

Boost :

Subject: Re: [boost] [fusion] Any chance we can incorporate more folds?
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-08-21 03:47:44


Zitat von David Sankel <camior_at_[hidden]>:

>>> 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) ?
>
>
> Almost...
>
> fold(pop_front(seq),front(seq), flip( f ) )
>
> where flip returns a version of f with swapped arguments.

are you using an older version of boost?
the arguments to f were swapped some time last year:
libs/fusion/doc/html/fusion/change_log.html

I don't know why this was done, but this might be the reason.

-Stefan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk