Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit 2a5d3a0

Browse files
committed
lstmap insert at back instead of beginning
1 parent 241f98e commit 2a5d3a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ft_lstmap.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: fbes <fbes@student.codam.nl> +#+ */
77
/* +#+ */
88
/* Created: 2020/11/03 17:42:36 by fbes #+# #+# */
9-
/* Updated: 2020/11/07 16:32:06 by fbes ######## odam.nl */
9+
/* Updated: 2020/11/16 14:26:41 by fbes ######## odam.nl */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -29,7 +29,7 @@ t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *))
2929
ft_lstclear(&new_list, del);
3030
return (NULL);
3131
}
32-
ft_lstadd_front(&new_list, new_elem);
32+
ft_lstadd_back(&new_list, new_elem);
3333
lst = lst->next;
3434
}
3535
return (new_list);

0 commit comments

Comments
 (0)