-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstiter.c
More file actions
31 lines (28 loc) · 1.3 KB
/
ft_lstiter.c
File metadata and controls
31 lines (28 loc) · 1.3 KB
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
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstiter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ccarnot <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/15 09:51:16 by ccarnot #+# #+# */
/* Updated: 2023/05/15 09:55:48 by ccarnot ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*******************************************
* Function: ft_lstiter
* Description: Iterates the list ’lst’ and applies the function ’f’ on the content of each node.
* Memory allocations: None
* Crash values:
* - (*f) is NULL
* Return value: None
*******************************************/
void ft_lstiter(t_list *lst, void (*f)(void *))
{
while (lst)
{
(*f)(lst->content);
lst = lst->next;
}
}