42-archive/libft/src/lst/ft_lstnew_range.c
2016-09-23 00:52:35 +02:00

16 lines
210 B
C

#include "libft.h"
t_list *ft_lstnew_range(int a, int b)
{
t_list *lst;
if (a >= b)
return (NULL);
lst = NULL;
while (a < b)
{
b--;
ft_lstadd(&lst, ft_lstnew(&b, sizeof(int)));
}
return (lst);
}