I have my own variations of `let` that return the ...
# getting-started
a
I have my own variations of
let
that return the original object, so if I want to allocate something and adjust it, but still return it without fail:
Copy code
public inline fun <T> T.initializedBy(initWith: (T) -> Unit): T {
    initWith(this)
    return this
}

val mapThing = ImmutableSettingsBuilder() initializedBy { 
      it.put("default" to "value") 
      it.put("other" to "value") 
}.build()
You can do the same with
let
but it COULD change the result type.