42/d13/ex01/btree_apply_prefix.c
2016-11-20 02:20:23 +02:00

22 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* btree_apply_prefix.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/11 12:50:38 by gtertysh #+# #+# */
/* Updated: 2016/11/11 19:57:57 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_btree.h"
void btree_apply_prefix(t_btree *root, void (*applyf)(void *))
{
if (!root)
return ;
applyf(root->item);
btree_apply_prefix(root->left, applyf);
btree_apply_prefix(root->right, applyf);
}