You are viewing a single comment's thread. Return to all comments →
HASKELL
rotate :: [Char] -> String rotate [] = [] rotate (x:xs) = xs ++ [x] rotateAll :: [Char] -> String rotateAll s = unwords $ auxRotate (rotate s) (length s) where auxRotate rs 0 = [] auxRotate rs n = rs : auxRotate (rotate rs) (n-1) main :: IO () main = interact $ unlines . map rotateAll . drop 1 . lines
Seems like cookies are disabled on this browser, please enable them to open this website
Rotate String
You are viewing a single comment's thread. Return to all comments →
HASKELL