|
Libft
42 Libft library documentation
|
Include dependency graph for ft_lstmap.c:Go to the source code of this file.
Functions | |
| t_list * | ft_lstmap (t_list *lst, void *(*f)(void *), void(*del)(void *)) |
| Creates a new linked list with the results of applying a function to each element of the original list. This function takes a linked list and two function pointers, then applies the first function to the content of each element in the list and creates a new list with the results. | |
Creates a new linked list with the results of applying a function to each element of the original list. This function takes a linked list and two function pointers, then applies the first function to the content of each element in the list and creates a new list with the results.
| lst | The linked list to iterate over. |
| f | The function to apply to each element. |
| del | The function to delete each element. |
Definition at line 26 of file ft_lstmap.c.
References s_list::content, ft_lstadd_back(), ft_lstclear(), ft_lstnew(), and s_list::next.
Here is the call graph for this function: