
12 Jul
2005
12 Jul
'05
8:39 a.m.
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