-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstiter.c
28 lines (25 loc) · 1.05 KB
/
ft_lstiter.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstiter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bsiguret <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/09 08:01:18 by bsiguret #+# #+# */
/* Updated: 2017/11/09 08:03:28 by bsiguret ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstiter(t_list *lst, void (*f)(t_list *elem))
{
t_list *i;
i = lst;
if (lst != NULL || f != NULL)
{
while (i)
{
f(i);
i = i->next;
}
}
}