rotate a linked list.