title: Kotlin: why would you want to convert Int.toString?
body: <p>i'm still new to kotlin so take my question with a grain of salt</p>
  <p>so i've been learning about kotlin and in one of the articles i was reading about had this code as an example of how to use .toString</p>
  <pre><code>val sum1 = { a: Int, b: Int -&gt; 
      val num = a + b 
      num.toString()   //convert Integer to String 
  } 
  fun main(args: Array&lt;String&gt;) { 
      val result1 = sum1(2,3) 
      println(&quot;The sum of two numbers is: $result1&quot;) 
  } 
  </code></pre>
  <p>Output:</p>
  <pre><code>The sum of two numbers is: 5
  </code></pre>
  <p>as i understand it, it's a &quot;5&quot; but of type string.. but why??</p>
  <p>we can just simplify the code and get the same outcome:</p>
  <pre><code>    val sum1 = { a: Int, b: Int -&gt; a + b }
  
      val result1 = sum1(2,3)
      println(&quot;The sum of two numbers is: $result1&quot;)
  </code></pre>
  <p>output:</p>
  <pre><code>The sum of two numbers is: 5
  </code></pre>
  <p>so.. i've seen examples of how to use it, but i still didn't find anything to explain why you'd want to use it</p>