#ifndef H_LIST

#include <stdio.h>

#include "elem.h"

#define NIL NULL

struct liststruct
{
  elem value;
  struct liststruct *next;
  struct liststruct *prev;
};
typedef struct liststruct *list;
typedef list pos;

list l_empty();
int l_isempty(list l);
list l_insert(elem e, pos p, list l);
list l_remove(pos p, list l);
pos l_first(list l);
pos l_last(list l);
pos l_prev(pos p, list l);
pos l_next(pos p, list l);
elem l_value(pos p, list l);
void l_show(list l);

#define H_LIST
#endif

