Scope Function with Lambda Receiver (Apply)

Run Settings
LanguageKotlin
Language Version
Run Command
fun main(args : Array<String>){ apply2() } fun apply1(){ val builder = StringBuilder() builder.append("Hello ") builder.append("Kotlin!") println(builder.toString()) } fun apply2(){ val message = StringBuilder().apply{ append("Hello ") append("Kotlin!") } println(message.toString()) }
Editor Settings
Theme
Key bindings
Full width
Lines