/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstmap.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet content)); if (root == NULL) return (NULL); last = root; lst = lst->next; while (lst != NULL) { last->next = ft_lstnew(f(lst->content)); if (last->next == NULL) { ft_lstclear(&root, del); return (NULL); } lst = lst->next; last = last->next; } return (root); }