Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-08-18 05:08:34


On 08/18/2005 12:07 AM, Bruno Martínez wrote:
> On Wed, 17 Aug 2005 15:29:51 -0300, Larry Evans
[snip]
>>Makes perfect sense to me. The fold metafunction calculates
>>a sequence of partial results which can then be accessed with
>>child_i_depth_j as shown in test driver in:
>
>
> The recursion in child_i_depth_j is a tail call. IIUC, the recursion is
> like the first drop, so increasing depths don't share part of the
> calculation. However, it could be written in the other style.

Yeah, you're right. I was thinking more of how fold was done. It
calculates all the intermediate results, but leaves no way to
access them. That was the purpose of child_i_depth_j. I'll
*eventually* try to write it the other way, but I'm not sure
when. Of course someone *expert* in doing that might try ;)

-Larry


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