libft
Functions
ft_lstmap.c File Reference
#include "libft.h"
+ Include dependency graph for ft_lstmap.c:

Go to the source code of this file.

Functions

t_listft_lstmap (t_list *lst, t_list *(*f)(t_list *elem))
 

Function Documentation

◆ ft_lstmap()

t_list* ft_lstmap ( t_list lst,
t_list *(*)(t_list *elem)  f 
)

Maps a function to each member of a list

Parameters
lstA pointer’s to the first link of a list.
fThe address of a function to apply to each link of a list.
Returns
The new list, or NULL if allocaton fails.

Definition at line 23 of file ft_lstmap.c.