Join Slack
Powered by
Is there a way to use the elvis operator or someth...
# getting-started
n
nikolaymetchev
04/05/2017, 11:43 AM
Is there a way to use the elvis operator or something similar in order to make this code more succinct:
Copy code
fun f(int : Int?) : String? = when(int) { null -> null else -> "${int.plus(3)}" }
3
Views
Open in Slack
Previous
Next