6.7 listing for append a node to linked list using a tail reference