let rec pp_fold_apply nil op pp fmt = function
  | [] -> Format.pp_print_string fmt nil
  | [x] -> pp fmt x
  | x::xs -> Format.fprintf fmt "@[<hov 1>(%s@ %a@ %a)@]" 
      op pp x (pp_fold_apply nil op pp) xs