title: LUB for Function2 and Function3 trait
body: <p>I have a function that has type</p>
  <pre><code>(String, String) =&gt; String
  </code></pre>
  <p>And another function that has type</p>
  <pre><code>(String, String, String) =&gt; String
  </code></pre>
  <p>Is there a way to cleanly create a common trait/superclass so that I can pass a list of them?</p>
  <p>Edit:
  I am passing more information on this because experts are curious as to my I want to add the two above types in a list. I am trying to add them ((String, String) =&gt; String and (String, String, String) =&gt; String) to a list because i am creating a test suite that takes a list of Tables and run a method that checks a condition (condition is the method).</p>
  <p>So I am trying to create a class like this</p>
  <pre><code>type DatabaseName = String
  type TableName = String
  type ColName = String
  type Output = String
  
  class TestFn(functionName : String, listOfTables : List[String], functionToRun : (DatabaseName, TableName) =&gt; Output)
  </code></pre>
  <p>I take the output and store it as a dataframe. I want this to be extendable. Another developer came to me and showed me a test case that contains this signature</p>
  <pre><code>(DatabaseName, TableName, ColName) =&gt; String
  </code></pre>
  <p>So I want to be able to create a superclass/trait so that it can take any function ((String, String) =&gt; String or (String, String, String) =&gt; String) and run that function on his list of tables</p>