SyTen

◆ visit() [1/3]

template<typename T >
template<typename Func >
static std::result_of< Func(Ptr)>::type syten::T3N::Tree::Tree< T >::visit ( Func &&  f,
typename std::result_of< Func(Ptr)>::type  initial,
Pair< IterDirection, IterDirection directions,
Ptr  ptr 
)
inlinestatic

Recursively visits a subtree, bottom-first.

Parameters
ffunction to call on each pointer to a node
initialinitial value of the accumulator
dirleft or right subtree first?
ptrpointer to root of subtree
Returns
the accumulated value from each branch and this node