How can I edit the following code to make Haskell show all the possibilities of rotating an input list from the user :
rotate :: Int -> [a] -> [a]
rotate n text = take (length text) (drop n (cycle text))
Run Code Online (Sandbox Code Playgroud)
I assume that to print all the possibilities we need to drop the first element X times. where X is the length of the list entered.
circle :: [a] -> [[a]]
circle text = take (length text) (drop (1) …Run Code Online (Sandbox Code Playgroud)