[Haskell-cafe] Combine list of sorted lists

Quan Ta 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!

Thanks,
Quan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20061229/53484962/attachment.htm


More information about the Haskell-Cafe mailing list