-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstiter.c
27 lines (25 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstiter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lumfred <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/15 14:58:25 by lumfred #+# #+# */
/* Updated: 2021/10/15 14:59:22 by lumfred ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstiter(t_list *lst, void (*f)(void*))
{
t_list *node;
node = lst;
if (!(lst == NULL || f == NULL))
{
while (node != NULL)
{
f(node->content);
node = node->next;
}
}
}