[Haskell-cafe] Re: Haskell problem please help

Christian Maeder maeder at tzi.de
Thu Dec 16 10:32:38 EST 2004

N.B. if you want a faster answer such questions are best posted to 
haskell-cafe at haskell.org

My answer: I asume that your function all_rotations somehow needs to be 
called recursively for the rest of the input list xs.

Cheers Christian

imranazad wrote:
> Hi,
> im not very good with haskell, i barely know the basics, my coursework
> requires me to genereate a vigenere square.......
> well anyway at the moment im trying to define a functin all_rotations
> which for any list returns the list of all its rotations, so far i've made
> an attempt but it only rotates once....any ideas? i dont want the complete
> solution just help thats all, much appreciated.
> all_rotations :: [a] -> [[a]]
> all_rotations [] = []
> all_rotations (x:xs) = reverse  (x:xs) : []

More information about the Haskell-Cafe mailing list