map (:[]), :[] takes a single element and puts it into a list. Somepeople 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