anchor.diff:  	function list.pop_back(): longInt;
   	var
   		it: list_iterator;
  -		tmp: longInt;
   	begin
   		it := get_end();
   		it.prev();
  -		tmp := it.get_data();
  +		pop_back := it.get_data();
   		erase(it);
  -		pop_back := tmp;
  +		it.destroy();
   	end;
   
   	procedure list.insert(p: list_iterator; data: longInt);
   	var
  -		link, nextLink, prevLink: list_link_pointer;
  -	begin
  -		new(link, create(data));
  -		if empty() then
  -		begin
  -			m_begin.destroy();
  -			m_begin := list_iterator.create(link);
  -			m_begin.getLink()^.setNext(m_end.getLink());
  -			m_end.getLink()^.setPrev(m_begin.getLink());
  +		link: list_link;
  +	begin
  +		link := list_link.create(data);
  +		if p.equal(m_end) and empty() then
  +		begin
  +			link.setNext(m_end.getLink());
  +			m_end.getLink().setPrev(link);
  +			m_begin.prev();
  +			p.prev();
   			exit();
   		end;
   
   		if p.equal(m_begin) then
   		begin
  -			nextLink := p.getLink();
  -			link^.setNext(nextLink);
  -			nextLink^.setPrev(link);
  -			m_begin.destroy();
  -			m_begin := list_iterator.create(link);
  +			link.setNext(m_begin.getLink());
  +			m_begin.getLink().setPrev(link);
  +			m_begin.prev();
  +			p.prev();
   		end
   		else
   		begin
  -			nextLink := p.getLink();
  +			link.setNext(p.getLink());
  +			link.setPrev(p.getLink().m_prev);
  +			p.getLink().m_prev.setNext(link);
  +			p.getLink().setPrev(link);
   			p.prev();
  -			prevLink := p.getLink();
  -			link^.setNext(nextLink);
  -			nextLink^.setPrev(link);
  -			link^.setPrev(prevLink);
  -			prevLink^.setNext(link); 
   		end;
   	end;
   
   	procedure list.erase(p: list_iterator);
  -	var
  -		nextLink, prevLink, curLink: list_link_pointer;
   	begin
   		if p.equal(m_end) then
   			exit();
   
   		if p.equal(m_begin) then
   		begin
  -			nextLink := p.getLink();
   			m_begin.next();
   			p.next();
  -			dispose(nextLink);
  +			p.getLink().m_prev.destroy();
   		end
   		else
   		begin
  -			nextLink := p.getLink()^.m_next;
  -			prevLink := p.getLink()^.m_prev;
  -			curLink := p.getLink();
   			p.next();
  -			dispose(curLink);
  -			nextLink^.setPrev(prevLink);
  -			prevLink^.setNext(nextLink);
  +			p.getLink().setPrev(p.getLink().m_prev.m_prev);
  +			p.getLink().m_prev.m_next.destroy();
  +			p.getLink().m_prev.setNext(p.getLink());
   		end;
   	end;
   
  
positive.code: unit listlib;
  interface
  	type
  		list_link_pointer = ^list_link;
  
  		list_link = object
  		public
  			constructor create(data: longInt);
  			
  			procedure setNext(link: list_link_pointer);
  			procedure setPrev(link: list_link_pointer);
  
  		private
  			m_data: longInt;
  			m_next: list_link_pointer;
  			m_prev: list_link_pointer;
  		end;
  
  		list_iterator = class
  		public
  			constructor create(l: list_link_pointer);
  			
  			procedure next();
  			procedure prev();
  
negative.code: 			function get_data(): longInt;
  			
  			function equal(other: list_iterator): boolean;
  			function getLink(): list_link;
  
  		private
  			m_link: list_link;
  		end;
  
  		list = class
  