use Puts#uniq to refactor FunctionMerger.merge