Last active
August 7, 2018 21:05
-
-
Save drulabs/a120086002c4b30e9beccec63d7866b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a function toINR() to kotlin's Double type | |
fun Double.toINR() = this * oneDollarInINR | |
// Yes it is a single line function | |
val netAmountDeposited = 230.0 | |
println("Net amount deposited(in INR): ${netAmountDeposited.toINR()}") | |
// Did you notice the string interpolation above | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment