fromList :: (Ord p) => [(p,a)] -> Heap p a
fromList = tf . map (uncurry singleton) where
  tf [] = Empty
  tf [x] = x
  tf l = tf (mp l)
  mp [] = []
  mp [x] = [x]
  mp (a:b:r) = (a <> b) : mp r
fromList :: (Ord p) => [(p,a)] -> Heap p a
fromList = tf . map (uncurry singleton) where
  tf [] = Empty
  tf [x] = x
  tf l = tf (mp l)
  mp [] = []
  mp [x] = [x]
  mp (a:b:r) = (a <> b) : mp r
fromList = tf . map (uncurry singleton) where
  tf [] = Empty
  tf [x] = x
  tf l = tf (mp l)
  mp [] = []
  mp [x] = [x]
  mp (a:b:r) = (a <> b) : mp r