title: Passing various enum case as function param in Swift
body: <p>I have two simple enums like this:</p>
  
  <pre><code>    enum Bar:String {
          case obj1 = "Object1"
      }
  
      enum Foo:String {
          case obj2 = "Object2"
      }
  </code></pre>
  
  <p>I want to write a function that takes enum case as param and it should print the case raw value. Something like this:</p>
  
  <pre><code>printCase(Bar.obj1) // prints "Object1"
  printCase(Foo.obj2) // prints "Object2"
  </code></pre>
  
  <p>I tried like <a href="https://stackoverflow.com/questions/38793536/possible-to-pass-an-enum-type-name-as-an-argument-in-swift">this</a> but it takes the whole enum as param. But my case is different from it. Any help would be appreciated. </p>
  
  <p>Thanks</p>