I am getting a parse error after I changed this:
h :: ([Int],Int,[Int])->[[Int]]
h ([],k,x) =[[]]
h(y:[],k,x) = [x++k:[y]]
h(y:xs,k,x)= [x++k:y:xs]++h(xs,k,x++[y])
to this: at line 3
h :: [Int]->Int->[Int]->[[Int]]
h [] k x =[[]]
h (y:[]) k x = [x++k:[y]]
h y:xs k x = [x++k:y:xs]++h(xs,k,x++[y])
There are two problems with this line:
h y:xs k x = [x++k:y:xs]++h(xs,k,x++[y])
^^^^ ^^^^^^^^^^^^^
(1) (2)
(y:xs)