28 lines
1.0 KiB
C
28 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_lstiter_bonus.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: pbonilla <eirodeis.lepnj@gmail.com> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2020/12/04 16:05:51 by pbonilla #+# #+# */
|
||
|
/* Updated: 2020/12/04 16:05:52 by pbonilla ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
void ft_lstiter(t_list *lst, void (*f)(void *))
|
||
|
{
|
||
|
t_list *tmp;
|
||
|
|
||
|
tmp = lst;
|
||
|
if (!f)
|
||
|
return ;
|
||
|
while (tmp)
|
||
|
{
|
||
|
f(tmp->content);
|
||
|
tmp = tmp->next;
|
||
|
}
|
||
|
}
|