Ejemplo n.º 1
0
void	ft_btree_apply_infix(t_btree **root, void (*f)(void *))
{
	if ((*root)->left)
		ft_btree_apply_infix(&(*root)->left, f);
	f((*root)->content);
	if ((*root)->right)
		ft_btree_apply_infix(&(*root)->right, f);
}
Ejemplo n.º 2
0
void	ft_btree_apply_infix(t_btree *root, void (*applyf)(t_btree*))
{
	if (!root || !applyf)
		return ;
	ft_btree_apply_infix(root->left, applyf);
	applyf(root);
	ft_btree_apply_infix(root->right, applyf);
	return ;
}