29 lines
1.2 KiB
C
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;
|
|
}
|
|
}
|