#include "libft.h" t_list *ft_lstfind(t_list *lst, void *data, int (*cmp)(void *, void *)) { while (lst) { if (cmp(lst->data, data) == 0) return (lst); lst = lst->next; } return (NULL); }