Join Slack
Powered by
what is the idiomatic way to instantiate a list if...
# announcements
j
janvladimirmostert
06/02/2017, 11:23 AM
what is the idiomatic way to instantiate a list if it’s null?
Copy code
if (list == null) list = mutableListOf()
or
Copy code
list = list ?: mutableListOf()
2
Views
Open in Slack
Previous
Next