merge [] ls = ls merge ls [] = ls merge (a:as) (b:bs) = if a <= b then a : merge as (b:bs) else b : merge (a:as) bs merge :: (Ord t) => [t] -> [t] -> [t]