-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstiter.c
More file actions
27 lines (24 loc) · 1.1 KB
/
ft_lstiter.c
File metadata and controls
27 lines (24 loc) · 1.1 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
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_lstiter.c :+: :+: */
/* +:+ */
/* By: farodrig <farodrig@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/09 14:03:44 by farodrig #+# #+# */
/* Updated: 2021/01/09 14:15:44 by farodrig ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** Iterates the list 'lst' and applies the function 'f' to the content of
** each elemen
*/
void ft_lstiter(t_list *list, void (*f)(void *))
{
while (list)
{
f(list->content);
list = list->next;
}
}