/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_list_foreach.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/08/14 13:21:57 by jhalford #+# #+# */ /* Updated: 2016/08/18 18:05:03 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include #include #include "ft_list.h" void ft_list_foreach(t_list *begin_list, void (*f)(void *)) { t_list *list_ptr; list_ptr = begin_list; while (list_ptr) { (*f)(list_ptr->data); list_ptr = list_ptr->next; } }