diff options
Diffstat (limited to 'c13/ex01/btree_apply_prefix.c')
| -rw-r--r-- | c13/ex01/btree_apply_prefix.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/c13/ex01/btree_apply_prefix.c b/c13/ex01/btree_apply_prefix.c index e69de29..530d698 100644 --- a/c13/ex01/btree_apply_prefix.c +++ b/c13/ex01/btree_apply_prefix.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/21 18:37:15 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "ft_btree.h" + +void btree_apply_prefix(t_btree *root, void (*applyf)(void *)) +{ + if (root == NULL) + return ; + (*applyf)(root->item); + btree_apply_prefix(root->left); + btree_apply_prefix(root->right); +} |
