apatrida
09/30/2015, 4:49 PMlet
is when you have something, and you want to change it to something else. Think of it as map
for a single value. And you can use it along with the ?.
operator to do something if the value isn't null
val hello: String = getTheirName().let { "hello ${it}" }
val number: Int = getTheirPhoneAsString().let { it.toLong() }