2023-04-15 06:55:33 +02:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* :::::::: */
|
2023-10-26 18:32:55 +02:00
|
|
|
/* ft_lstiter.c :+: :+: */
|
2023-04-15 06:55:33 +02:00
|
|
|
/* +:+ */
|
|
|
|
/* By: djonker <marvin@codam.nl> +#+ */
|
|
|
|
/* +#+ */
|
|
|
|
/* Created: 2020/11/13 19:15:47 by djonker #+# #+# */
|
2023-10-26 18:32:55 +02:00
|
|
|
/* Updated: 2023/10/18 16:59:53 by houtworm ######## odam.nl */
|
2023-04-15 06:55:33 +02:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include "../libft.h"
|
|
|
|
|
|
|
|
void ft_lstiter(t_list *lst, void (*f)(void *))
|
|
|
|
{
|
|
|
|
if (!f || lst == NULL)
|
|
|
|
return ;
|
|
|
|
while (lst)
|
|
|
|
{
|
|
|
|
(*f)(lst->content);
|
|
|
|
lst = lst->next;
|
|
|
|
}
|
|
|
|
}
|