title: Swap Function in Kotlin
body: <p>is there any better way to write generic swap function in kotlin other than java way described in <a href="https://stackoverflow.com/questions/3624525/how-to-write-a-basic-swap-function-in-java">How to write a basic swap function in Java</a>.</p>
  
  <p>Is there any kotlin language feature which can make generic swap function more concise and intuitive?</p>