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); }
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); } }
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); } }