title: iOS Swift How to create a Protocol instance
body: <p>I am a Android developer, and I'm very new to Swift so please bear with me. I am trying to implement callback functions with Protocol in Swift. In Java I can create an Interface and make it an instance without linking it to any implementing class so that I can pass it around, for example:</p>
  
  <pre><code>public interface SomeListener {
      void done(); 
  }
  
  SomeListener listener = new SomeListener() {
      @Override
      public void done() {
          // do something
      }
  }
  listener.done();
  </code></pre>
  
  <p>How can I do it with Protocol in Swift? Or can it actually be done?</p>