Singly linked list and closures