Example of a generic doubly linked list. Use at your own risk.