aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_lstiter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_lstiter.c')
-rw-r--r--src/ft_lstiter.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ft_lstiter.c b/src/ft_lstiter.c
new file mode 100644
index 0000000..84fc000
--- /dev/null
+++ b/src/ft_lstiter.c
@@ -0,0 +1,11 @@
+#include "libft.h"
+
+void
+ft_lstiter (t_list *lst, void (*f) (void *))
+{
+ while (lst)
+ {
+ f (lst->content);
+ lst = lst->next;
+ }
+}