Implements a singly-linked list.