Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] proto::reverse_fold_tree
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-02 15:02:51


Joel Falcou wrote:
> Eric Niebler a écrit :
>> Certainly, but not with any of Proto's "built-in" transforms. Generic
>> tree traversal is a HUGE domain, and not something I can just whip
>> out. ;-) Dan Marsden has been working on that problem for some time
>> with his Boost.Traversal library. The Haskell folks have done lots of
>> work in this area, too. Just Google "Scrap Your Boilerplate" and see
>> how deep the rabbit hole goes.
>
> Yeah I kinda digged into it last time I bothered you with my code
> snippet a few month ago.
> Well, what kind of approach can be take to get something simple going on ?
>

My advice to you would be the same as my advice to Kim. Much can be done
with recursion and proto::fold. Copy the implementation from
proto::fold_tree or proto::reverse_fold_tree and modify it as needed.

http://boost-sandbox.sourceforge.net/libs/proto/doc/html/boost/proto/fold_tree.html

HTH,

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net