libft
src
ft_lstiter.c
Go to the documentation of this file.
1
/* ************************************************************************** */
3
/* */
4
/* ::: :::::::: */
5
/* ft_lstiter.c :+: :+: :+: */
6
/* +:+ +:+ +:+ */
7
/* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8
/* +#+#+#+#+#+ +#+ */
9
/* Created: 2019/09/05 16:51:17 by unite #+# #+# */
10
/* Updated: 2020/07/16 03:02:16 by unite ### ########.fr */
11
/* */
12
/* ************************************************************************** */
13
14
#include "
libft.h
"
15
22
void
ft_lstiter
(
t_list
*lst,
void
(*f)(
t_list
*elem))
23
{
24
if
(!f)
25
return ;
26
while
(lst)
27
{
28
f(lst);
29
lst = lst->
next
;
30
}
31
}
ft_lstiter
void ft_lstiter(t_list *lst, void(*f)(t_list *elem))
Applies a function to each member of a list.
Definition:
ft_lstiter.c:22
s_list
A link in a multi-purpose linked list.
Definition:
libft.h:34
s_list::next
struct s_list * next
The next link’s address or NULL if it’s the last link.
Definition:
libft.h:38
libft.h
Generated by
1.8.16