[Haskell-cafe] Re: Haskell problem please help
M.I.Azad1 at Bradford.ac.uk
M.I.Azad1 at Bradford.ac.uk
Thu Dec 16 10:57:58 EST 2004
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?, much appreciated.
> >
> > all_rotations :: [a] -> [[a]]
> > all_rotations [] = []
> > all_rotations (x:xs) = reverse (x:xs) : []
regards,
imran
------------------------------------------------------------
This mail sent through IMP: http://webmail.brad.ac.uk
To report misuse from this email address forward the message
and full headers to misuse at bradford.ac.uk
------------------------------------------------------------
More information about the Haskell-Cafe
mailing list