Challenge 1: A Lambda-with-Receiver Warm-Up — Solution fun buildGreeting(init: StringBuilder.() -> Unit): String { val sb = StringBuilder() sb.init() return sb.toString() } fun main() { val greeting = buildGreeting { append("Hello, ") append("Philip") append("!") } println(greeting) } /* Output: Hello, Philip! Notes: - init: StringBuilder.() -> Unit declares init as a lambda WITH RECEIVER — StringBuilder is the receiver type, so inside the lambda passed to buildGreeting, "this" is the StringBuilder, and its methods (append) are callable directly without a prefix. - sb.init() runs that lambda with sb as the receiver — equivalent to temporarily treating the lambda's code as if it were written as methods on sb itself. - Each append(...) call inside the lambda operates on the same sb instance, building up the final string before buildGreeting returns sb.toString(). */