factor out FunctionDecomposer::Parallel#merge