Rotate list

Shift lines left or right while keeping the list length.