text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_lstmap.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: maljean <marvin@42.fr>                     +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2018/03/03 19:09:50 by maljean           #+#    #+#             */
  /*   Updated: 2018/03/03 19:12:26 by maljean          ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  t_list	*ft_lstmap(t_list *lst, t_list *(*f)(t_list *elem))
  {
  	t_list	*new;
  
  	if (lst)
  	{
  		new = f(lst);
  		new->next = ft_lstmap(lst->next, f);
  		return (new);
  	}
  	return (NULL);
  }
  