Skip to content

Instantly share code, notes, and snippets.

View akexorcist's full-sized avatar
🔥

Akexorcist akexorcist

🔥
View GitHub Profile
val user = User("Akexorcist")
val followerCount = user.run {
...
val count = getUserFollowerCount(name)
}
val user = User("Akexorcist").apply {
age = 17
job = "Android Developer"
company = "Nextzy Technologies"
}
val user = User("Akexorcist").apply {
age = 17
job = "Android Developer"
company = "Nextzy Technologies"
}.also {
Log.d(TAG, "User created : $it")
}
val user = User("Akexorcist").apply {
age = 17
}.also {
it.job = getJobByName(it.name)
it.company = getCompanyByName(it.name)
}
val user = User("Akexorcist").apply{
...
}.run {
updateWelcomeMessage(name)
}
val user = User("Akexorcist")
with(user) {
...
log("User created : ${toString()}")
}
UserProfileParam("219347017350").apply {
page = 0
count = 30
}.also {
print("Get profile (id:${it.id})")
track("Get profile", ${it.toString()})
}.run {
val response = getUserProfile(this)
saveToDatabase(response)
}
val param = UserProfileParam("219347017350")
param.page = 0
param.count = 30
print("Get user profile info (id:${param.id}, page:${param.page}, count:${param.count})")
track("Get user profile info : ${param.id}")
val response = getUserProfile(param)
saveToDatabase(response)
val response = UserProfileParam("219347017350").apply {
page = 0
count = 30
}.also {
print("Get user profile info (id:${it.id}, page:${it.page}, count:${it.count})")
track("Get user profile info : ${it.id}")
}.run {
val response = getUserProfile(this)
saveToDatabase(response)
response