1. 프로토타입
void ft_lstiter(t_list *lst, void (*f)(void *))
2. 용도
3. 리턴값
4. 코드 구현
#include "libft.h"
void ft_lstiter(t_list *lst, void (*f)(void *))
{
t_list *now;
now = lst;
if (lst == NULL || f == NULL)
return ;
while (now != NULL)
{
f(now->content);
now = now->next;
}
}
5. 코드 설명