This file contains hidden or 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
| val user = User("Akexorcist") | |
| val followerCount = user.run { | |
| ... | |
| val count = getUserFollowerCount(name) | |
| } |
This file contains hidden or 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
| val user = User("Akexorcist") | |
| val message = user.let { | |
| "Hello, ${it.name}" | |
| } |
This file contains hidden or 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
| val user = User("Akexorcist").apply { | |
| age = 17 | |
| job = "Android Developer" | |
| company = "Nextzy Technologies" | |
| } |
This file contains hidden or 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
| val user = User("Akexorcist").apply { | |
| age = 17 | |
| job = "Android Developer" | |
| company = "Nextzy Technologies" | |
| }.also { | |
| Log.d(TAG, "User created : $it") | |
| } |
This file contains hidden or 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
| val user = User("Akexorcist").apply { | |
| age = 17 | |
| }.also { | |
| it.job = getJobByName(it.name) | |
| it.company = getCompanyByName(it.name) | |
| } |
This file contains hidden or 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
| val user = User("Akexorcist").apply{ | |
| ... | |
| }.run { | |
| updateWelcomeMessage(name) | |
| } |
This file contains hidden or 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
| val user = User("Akexorcist") | |
| with(user) { | |
| ... | |
| log("User created : ${toString()}") | |
| } |
This file contains hidden or 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
| 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) | |
| } |
This file contains hidden or 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
| 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) |
This file contains hidden or 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
| 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 |