
16 Oct
2008
16 Oct
'08
5:08 a.m.
John Ky wrote:
Hi,
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 http://wwwtcs.inf.tu-dresden.de/~voigt/ mailto:voigt@tcs.inf.tu-dresden.de