I'm trying to understand why `Standard.kt` provides three differently named "global" functions (`let`, `with`, `T.run`) which appear to be extremely similar, and whose subtle differences I find difficult to tell from their names. In particular, what would be lost by replacing these methods with the single method below?
// allows to use implicit or explicit receiver based on circumstances (e.g. nesting) fun <T, R> T.with(f: T.(T) -> R): R = this.f(this)
If there is a good reason to keep all three functions, please explain the reasoning in the code docs.
A related question: What does
run(f) give over
f.invoke()? (First time I came across this function, I thought it might perhaps run its argument in a separate thread.)