[Haskell-cafe] Pattern matching error
byorgey at gmail.com
Thu Dec 6 12:50:20 EST 2007
> kmerge ((x,[y]):) = [(x,[y])]
Matching on [y] like this will only match lists with a single element (and
bind y to that element). You probably just want to say
kmerge ((x,y):) = [(x,y)]
etc., which will bind y to the entire list.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe