25 lines
1.0 KiB
C
25 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* :::::::: */
|
||
|
/* ft_lstiter.c |o_o || | */
|
||
|
/* +:+ */
|
||
|
/* By: djonker <marvin@codam.nl> +#+ */
|
||
|
/* +#+ */
|
||
|
/* Created: 2020/11/13 19:15:47 by djonker #+# #+# */
|
||
|
/* Updated: 2023/03/04 15:30:35 by houtworm \___)=(___/ */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#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;
|
||
|
}
|
||
|
}
|