[Haskell-cafe] Can't explain this error

Andy Georges andy.georges at elis.ugent.be
Tue Jul 12 09:16:30 EDT 2005


On 12 Jul 2005, at 14:39, Dinh Tien Tuan Anh wrote:

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

First of all ... there is a ) missing ... I guess the line should read

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

?

-- Andy



More information about the Haskell-Cafe mailing list