#include "LList.h"
#include <iostream>
using namespace std;

int main(void)
{
	LList myList;
	myList.add(1);
	myList.add(2);
	myList.add(3);
	myList.add(4);
	if(!myList.atEnd()){
	  cout<<myList.peek()<<"\n";
	  myList.del();
	}
	else cout<<"error";
	if(!myList.atEnd()){
	  cout<<myList.peek()<<"\n";
	  myList.del();
	}
	else cout<<"error";
	if(!myList.atEnd()){
	  cout<<myList.peek()<<"\n";
	  myList.del();
	}
	else cout<<"error";
	if(!myList.atEnd()){
	  cout<<myList.peek()<<"\n";
	  myList.del();
	}
	else cout<<"error";
	if(!myList.atEnd()){
	  cout<<myList.peek()<<"\n";
	  myList.del();
	}
	else cout<<"error - at end\n";
	if(!myList.isEmpty()){
	  cout<<myList.peek()<<"\n";
	  myList.del();
	}
	else cout<<"error - list empty\n";

	return 0;
}