i have just encountered another type error.
This program tries to print out partitions of a positive integer (i guess)

parts 0 = [[]]
parts x = [concat (map (y:) parts(x-y) | y<-[1..(x `div` 2)]]

and got this error:
**** Expression                   : map (y:) parts(x-y)
**** Term                           : map
**** Type                            : (e->f) -> [e] -> [f]
**** Does not match            : a -> b -> c -> d

why do i have this error ? How to fix it ?

Thanks a lot

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to