title: Kotlin syntax for LiveData observer?
body: <p>I have the following bit of code in my <code>HomeActivity</code> to use <code>LiveData</code>.  </p>
  
  <pre><code>override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
  
      // Show the launch splash screen.
      //
      this.setContentView(R.layout.activity_home)
  
      this.viewModel = ViewModelProviders.of(this).get(HomeViewModel::class.java)
  
      this.viewModel.getUser().observe(this, Observer { user: User? -&gt;
  
      });
  
  }
  </code></pre>
  
  <p>While this seems to work, what does the following part mean?</p>
  
  <pre><code>Observer { user: User? -&gt;
  
  }
  </code></pre>
  
  <p>This must result in an object that conforms to the <code>Observer</code> interface which has </p>
  
  <pre><code>void onChanged (T t)
  </code></pre>
  
  <p><a href="https://developer.android.com/reference/android/arch/lifecycle/Observer.html" rel="noreferrer">https://developer.android.com/reference/android/arch/lifecycle/Observer.html</a></p>
  
  <p>How does </p>
  
  <pre><code>Observer { user: User? -&gt;
  
  }
  </code></pre>
  
  <p>result in an object with an <code>onChanged</code> method?</p>
  
  <p>I don't know what  putting the name of an interface in front of a lambda expression means.</p>
  
  <p>Thanks!</p>