Libft
42 Libft library documentation
Loading...
Searching...
No Matches
ft_lstiter.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* ft_lstiter.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: raphalme <raphalme@student.42.fr> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/12/29 19:22:00 by raphalme #+# #+# */
9
/* Updated: 2026/04/14 10:36:21 by raphalme ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "../includes/types.h"
14
23
void
ft_lstiter
(
t_list
*lst,
void
(*f)(
void
*))
24
{
25
if
(!lst || !f)
26
return ;
27
while
(lst)
28
{
29
f(lst->
content
);
30
lst = lst->
next
;
31
}
32
}
ft_lstiter
void ft_lstiter(t_list *lst, void(*f)(void *))
Iterates over a linked list and applies a function to each element. This function takes a linked list...
Definition
ft_lstiter.c:23
s_list
Definition
types.h:4
s_list::next
struct s_list * next
Definition
types.h:6
s_list::content
void * content
Definition
types.h:5
src
ft_lstiter.c
Generated by
1.9.8