fuckinlem_in/libft/srcs/ft_lstiter.c
Tanguy MAZE 54be2278c0 It finnaly kinda works
algorithm with no double nodes and nearly efficient enough
still some optimizations to find for --big-superposition maps
2019-04-18 20:18:50 +02:00

26 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstiter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/08 19:48:44 by tmaze #+# #+# */
/* Updated: 2018/04/08 19:51:33 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_lstiter(t_list *lst, void (*f)(t_list *elem))
{
t_list *tmp;
tmp = lst;
while (tmp)
{
(*f)(tmp);
tmp = tmp->next;
}
}