<commit_before>{$mode objfpc} // directive to be used for defining classes
{$m+}		   // directive to be used for using constructor

unit containers;
interface
	type
		link = class
		public
			constructor create(data: longInt);
			
			procedure set_next(link: link);
			procedure set_prev(link: link);

		private
			m_data: longInt;
			m_next: link;
			m_prev: link;
		end;

		iterator = class
		public
			constructor create(l: link);
			
			procedure next();
			procedure prev();
			
			procedure set_data(data: longInt);
			function get_data(): longInt;
			
			function equal(other: iterator): boolean;
			function get_link(): link;

		private
			m_link: link;
		end;

		container = class
		public
			constructor create();
			destructor destroy(); override;
			
			function get_begin(): iterator;
			function get_end(): iterator;

			procedure push_back(data: longInt);
			function pop_back(): longInt;

			procedure insert(p: iterator; data: longInt);
			procedure erase(p: iterator);

			function at(index: longInt): longInt;
			function empty(): boolean;
			function size(): longInt;

		private
			m_begin: iterator;
			m_end: iterator;
		end;

implementation
	constructor link.create(data: longInt);
	begin
		m_data := data;
		m_next := nil;
		m_prev := nil;
	end;

	procedure link.set_next(link: link);
	begin
		m_next := link;
	end;

	procedure link.set_prev(link: link);
	begin
		m_prev := link;
	end;

	constructor iterator.create(l: link);
	begin
		m_link := l;
	end;

	procedure iterator.next();
	begin<commit_msg>fix name variable<commit_after>{$mode objfpc} // directive to be used for defining classes
{$m+}		   // directive to be used for using constructor

unit containers;
interface
	type
		link = class
		public
			constructor create(data: longInt);
			
			procedure set_next(pLink: link);
			procedure set_prev(pLink: link);

		private
			m_data: longInt;
			m_next: link;
			m_prev: link;
		end;

		iterator = class
		public
			constructor create(l: link);
			
			procedure next();
			procedure prev();
			
			procedure set_data(data: longInt);
			function get_data(): longInt;
			
			function equal(other: iterator): boolean;
			function get_link(): link;

		private
			m_link: link;
		end;

		container = class
		public
			constructor create();
			destructor destroy(); override;
			
			function get_begin(): iterator;
			function get_end(): iterator;

			procedure push_back(data: longInt);
			function pop_back(): longInt;

			procedure insert(p: iterator; data: longInt);
			procedure erase(p: iterator);

			function at(index: longInt): longInt;
			function empty(): boolean;
			function size(): longInt;

		private
			m_begin: iterator;
			m_end: iterator;
		end;

implementation
	constructor link.create(data: longInt);
	begin
		m_data := data;
		m_next := nil;
		m_prev := nil;
	end;

	procedure link.set_next(pLink: link);
	begin
		m_next := link;
	end;

	procedure link.set_prev(pLink: link);
	begin
		m_prev := link;
	end;

	constructor iterator.create(l: link);
	begin
		m_link := l;
	end;

	procedure iterator.next();
	begin
{'fraction_non_alphanumeric': 0.10725964682799215, 'fraction_numerical': 0.0, 'mean_word_length': 3.518463810930576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '233216', 'n_tokens_mistral': 1201, 'n_tokens_neox': 966, 'n_words': 297}