Esempio n. 1
0
void	btree_apply_infix(t_btree *root, void (*applyf)(void *))
{
	if (root->left)
		btree_apply_infix(root->left, applyf);
	applyf(root->item);
	if (root->right)
		btree_apply_infix(root->right, applyf);
}
Esempio n. 2
0
void		btree_apply_infix(t_btree *root, void (*f) (void *))
{
	if (root)
	{
		btree_apply_infix(root->left, f);
		f(root->item);
		btree_apply_infix(root->right, f);
	}
}
Esempio n. 3
0
void		btree_apply_infix(t_btree *root, void (*f)(void *))
{
	if (root != NULL)
	{
		if (root->left != NULL)
			btree_apply_infix(root->left, f);
		(*f)(root->item);
		if (root->right != NULL)
			btree_apply_infix(root->right, f);
	}
}