title: Pass interface as parameter in Kotlin
body: <p>I want to pass an interface as parameter like this:</p>
  
  <pre><code>class Test {
      fun main() {
          test({})
          // how can I pass here?
      }
  
      fun test(handler: Handler) {
          // do something
      }
  
      interface Handler {
          fun onCompleted()
      }
  }
  </code></pre>
  
  <p>In Java, I can use anonymous function like <code>test(new Handler() { .......... })</code>, but I can't do this in Kotlin. Anyone know how to do this?</p>