Generic library for working with linked lists in C