let rec merge_first tas = function
  | (a,_)::fin -> merge_first (a::tas) fin
  | []         -> tas