diff options
Diffstat (limited to 'c13/ex02/btree_apply_infix.c')
| -rw-r--r-- | c13/ex02/btree_apply_infix.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/c13/ex02/btree_apply_infix.c b/c13/ex02/btree_apply_infix.c index e69de29..3ff3278 100644 --- a/c13/ex02/btree_apply_infix.c +++ b/c13/ex02/btree_apply_infix.c @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* btree_apply_infix.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/21 18:28:07 by cacharle #+# #+# */ +/* Updated: 2019/07/23 21:09:53 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "ft_btree.h" + +void btree_apply_infix(t_btree *root, void (*applyf)(void *)) +{ + if (root == NULL) + return ; + btree_apply_infix(root->left); + (*applyf)(root->item); + btree_apply_infix(root->right); +} |
