Defined a function to cycle a list by n places.