--

-- cmp u v  = if u -<= v then u else v

-- Fusion
{-
h (foldrn f g xs)  =  foldrn f' g' xs
h (g x)   = g' x
h (f x y) = f' x (h y)

h (foldrn f g xs) ~> foldrn f' g' xs
-}

-- cost' = map cost . reverse . spine

insert' :: Int -> [Tree] -> [Tree]
insert' x ts = Leaf x : split' x ts
insert' :: Int -> [Tree] -> [Tree]
insert' x ts = Leaf x : split' x ts
insert' x ts = Leaf x : split' x ts