title: Kotlin - Unexpected tokens (use ';' to separate expressions on the same line) with ternary operator in lambda function
body: <p>I got an error <code>Unexpected tokens</code> error on the lambda function when I try to run this <a href="https://pl.kotl.in/OIDLid831" rel="nofollow noreferrer">code</a>:</p>
  
  <pre><code>fun main() {
      val oddOrEven = { number: Int -&gt; (number % 2 == 0) ? "Even" : "Odd" }
      print(oddOrEven(2))
  }
  </code></pre>