How to define a rotates function that generates all rotations of the given list?
For example: rotates [1,2,3,4] =[[1,2,3,4],[2,3,4,1],[3,4,1,2],[4,1,2,3]]
[1,2,3,4] =[[1,2,3,4],[2,3,4,1],[3,4,1,2],[4,1,2,3]]
myRotate lst = lst : myRotateiter lst lst where myRotateiter (x:xs) orig |temp == orig = [] |otherwise = temp : myRotateiter temp orig where temp = xs ++ [x]