An implementation of generic linked list