struct s_list * next
Pointer to the next node.
Definition ft_list.h:64
void * content
Pointer to the node's content.
Definition ft_list.h:63
void ft_lstadd_front(t_list **lst, t_list *new)
Adds a node to the front of a list.
Definition ft_list.c:63
void ft_lstiter(t_list *lst, void(*f)(void *))
Applies a function to each element of the list.
Definition ft_list.c:205
void ft_del(void *content)
Deletes content pointer in a list node (utility function).
Definition ft_list.c:112
void ft_lstadd_back(t_list **lst, t_list *new)
Adds a node to the end of a list.
Definition ft_list.c:84
struct s_list t_list
Node structure for singly linked list.
void ft_lstclear(t_list **lst, void(*del)(void *))
Clears an entire list, deleting all its nodes.
Definition ft_list.c:151
t_list * ft_lstmap(t_list *lst, void *(*f)(void *), void(*del)(void *))
Creates a new list by applying a function to each node.
Definition ft_list.c:238
t_list * ft_lstnew(void *content)
Creates a new list node.
Definition ft_list.c:39
int ft_lstsize(t_list *lst)
Counts the number of nodes in a list.
Definition ft_list.c:277
void ft_lstdelone(t_list *lst, void(*del)(void *))
Deletes a single node using a deletion function.
Definition ft_list.c:129
t_list * ft_lstlast(t_list *lst)
Returns the last node of the list.
Definition ft_list.c:181