blob: e46b5070562d5b44ba451eaa1558f413450b23cf (
plain)
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
29
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstiter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/09 09:03:22 by cacharle #+# #+# */
/* Updated: 2019/11/20 04:01:39 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_lst.h"
/*
** \brief Iterate of list
** \param f Funtion applied to data of each node
*/
void ft_lstiter(t_ftlst *lst, void (*f)(void *))
{
if (f == NULL)
return ;
while (lst != NULL)
{
(*f)(lst->data);
lst = lst->next;
}
}
|