
20 Aug
2010
20 Aug
'10
8:43 p.m.
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. It is very useful for fusion sequences of possibly distinct types that have identical concepts which can be merged in some way (like generators). I very much like the folds that are included in Haskell's prelude, namely foldl, foldl1, foldr (somewhat like boost's fold), and foldr1[1]. David [1] http://www.haskell.org/onlinereport/haskell2010/haskellch20.html#x28-2310002... -- David Sankel Sankel Software www.sankelsoftware.com 585 617 4748 (Office)