42-archive/nm-otool/libft/srcs/btree/btree_apply_infix.c
2017-10-07 18:24:39 +02:00

23 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* btree_create_node.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/08/16 13:43:51 by jhalford #+# #+# */
/* Updated: 2017/03/06 18:22:31 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "btree.h"
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);
return ;
}