-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_lstiter.c
27 lines (25 loc) · 1.17 KB
/
ft_lstiter.c
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: mhiguera <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 18:20:46 by mhiguera #+# #+# */
/* Updated: 2023/03/19 19:43:52 by mhiguera ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstiter(t_list *lst, void (*f)(void *))
{
while (lst != '\0')
{
f(lst->content);
lst = lst->next;
}
}
/*
* Mientras que no se haya acabado la lista, quiero que vaya aplicando la
* función f al content de cada nodo. Avanzaré de nodo situándome en la
* posición next.
*/