``` class BundleBuilder(private val bundle: Bundle...
# announcements
v
Copy code
class BundleBuilder(private val bundle: Bundle) {
  operator fun String.invoke(value: String) {
    bundle.putString(this, value)
  }
}

inline fun bundle(action: BundleBuilder.() -> Unit): Bundle {
  val bundle = Bundle()
  val builder = BundleBuilder(bundle)
  builder.action()
  return bundle
}

fun test() {
  val bundle = bundle {
    "key"("value")
  }
}
­čĹŹ 1