libftx/libft/ft_lstiter.c
Camille Chauvet fcbe35befd kekw
2023-01-19 17:33:26 +01:00

25 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstiter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/30 00:05:43 by cchauvet #+# #+# */
/* Updated: 2022/10/05 20:58:18 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstiter(t_list *lst, void (*f)(void *))
{
if (f == NULL)
return ;
while (lst != NULL)
{
f(lst->content);
lst = lst->next;
}
}