data Tree k = Leaf | Branch (Tree k) k (Tree k) insert :: Ord k => k -> Tree k -> Tree k build :: Ord k => [k] -> Tree k build = foldr ... ... sort :: Ord k => [k] -> [k] sort xs = ... ( ... xs )