Adding code for function that checks equality of two singly-linked lists.