ft_lstiter.c 1.0 KB

1234567891011121314151617181920
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_lstiter.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: mazimi <mazimi@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2014/12/10 14:34:01 by mazimi #+# #+# */
  9. /* Updated: 2015/05/05 20:06:42 by mazimi ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "../libft.h"
  13. void ft_lstiter(t_list *lst, void (*f)(t_list *elem))
  14. {
  15. f(lst);
  16. if (lst->next)
  17. ft_lstiter(lst->next, f);
  18. }