[Haskell-cafe] Combine list of sorted lists
quancta at gmail.com
Fri Dec 29 15:16:33 EST 2006
On 12/29/06, Neil Mitchell <ndmitchell at gmail.com> wrote:
> map (:), : takes a single element and puts it into a list. Some
> people refer to this as "box"
> The final f3 clause can be made a bit neater:
> > f3 la@(a:as) lb@(b:bs) | sum a <= sum b = a : f3 as lb
> | otherwise = b : f3 la bs
> Hi Neal,
Neat tricks on both counts - thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe