libft/list/ft_lstiter.c
Raphael 905ffd4b72
refactor: only the usefull header
- Removing all 'libft.h' mention
- Using the include only on the files needed by
2025-09-01 18:45:33 +02:00

29 lines
1.2 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstiter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:42:24 by rparodi #+# #+# */
/* Updated: 2025/09/01 16:35:17 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "list.h"
#include <unistd.h>
/**
* @brief Apply the fstunction given in arguments at all the element of the list
*
* @param lst the chained list
* @param f the pointer to function
*/
void ft_lstiter(t_list *lst, void (*f)(void *))
{
while (lst != NULL)
{
f(lst->content);
lst = lst->next;
}
}