#include "List.h"

List cons(ListElementType E, List L)  /*A*/
 { List L2;                           /*l*/
   L2 = (List)malloc(sizeof(Cell));   /*l*/
   L2->hd = E;                        /*i*/
   L2->tl = L;                        /*s*/
   return L2;                         /*o*/
 }/*cons*/                            /*n*/

int null(List L)/*predicate*/ { return L==NULL ? 1 : 0; }

ListElementType head(List L)
/* pre: not null(L) */
 { return L->hd; }

List tail(List L)
/* pre: not null(L) */
 { return L->tl; }

/* Basic List Operation */
