<commit_before>//Converting a doubly linked list C implementation to C++, replacing void pointer polymorphism with 
//Object-Orientated polymorphism paradigms in C++, namely templates.

#include <iostream>

using namepsace std;

template<class T>
class doublylinkedlist
{
private:
	struct node
	{
		T data;
		node *prev;
		node *next;
	}
public:
	doublylinkedlist(){}
	
	//class methods to be implemented outside of class definition
	void append(T);
	void push(T);
	void pop();
};

template<class T> 
void doublylinkedlist<T>::append(T item)
{ 
	node *p=new node; 
	p->data=item; 
	p->prev=tail; 
	p->next=NULL; 
	tail=p; 
}
	<commit_msg>Update dlistcpp.cpp<commit_after>//Converting a doubly linked list C implementation to C++, replacing void pointer polymorphism with 
//Object-Orientated polymorphism paradigms in C++, namely templates.

#include <iostream>

using namepsace std;

template<class T>
class doublylinkedlist
{
private:
	struct node
	{
		T data;
		node *prev;
		node *next;
	}
public:
	doublylinkedlist(){}
	
	//class methods to be implemented outside of class definition
	void append(T);
	void push(T);
	void pop();
	bool contains(T);
	void drop(T);
	void reverse();
	void clone();
};

template<class T> 
void doublylinkedlist<T>::append(T item)
{ 
	node *p=new node; 
	p->data=item; 
	p->prev=tail; 
	p->next=NULL; 
	tail=p; 
}
	
{'fraction_non_alphanumeric': 0.12091988130563798, 'fraction_numerical': 0.0, 'mean_word_length': 4.33201581027668, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '4495498', 'n_tokens_mistral': 504, 'n_tokens_neox': 456, 'n_words': 145}