[Haskell-cafe] What is this function?
voigt at tcs.inf.tu-dresden.de
Thu Oct 16 05:08:34 EDT 2008
John Ky wrote:
> I've written this function here:
> scramble  = 
> scramble [x] = [[z] | z <- scramble x]
> scramble (x:xs) =
> [(y:z)|y <- scramble x, z <- scramble xs]
> and (I think) it roughly does what I want it to:
That is strange, as it does not even type-check ;-)
See the "y <- scramble x" part.
Dr. Janis Voigtlaender
mailto:voigt at tcs.inf.tu-dresden.de
More information about the Haskell-Cafe