From 7ddac1945e96aa71c182cbe96ef32ff3f4bd303d Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Mon, 28 Dec 2015 17:37:11 +0300 Subject: [PATCH] Unify functional parameter name for 'let', 'run', 'with', 'apply' scope function with 'use' and 'synchronize'. --- libraries/stdlib/src/kotlin/util/Standard.kt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libraries/stdlib/src/kotlin/util/Standard.kt b/libraries/stdlib/src/kotlin/util/Standard.kt index 7e3113787cb..c8d7c86ffa6 100644 --- a/libraries/stdlib/src/kotlin/util/Standard.kt +++ b/libraries/stdlib/src/kotlin/util/Standard.kt @@ -22,26 +22,26 @@ public fun TODO(reason: String): Nothing = throw NotImplementedError("An operati /** - * Calls the specified function [f] and returns its result. + * Calls the specified function [block] and returns its result. */ -public inline fun run(f: () -> R): R = f() +public inline fun run(block: () -> R): R = block() /** - * Calls the specified function [f] with `this` value as its receiver and returns its result. + * Calls the specified function [block] with `this` value as its receiver and returns its result. */ -public inline fun T.run(f: T.() -> R): R = f() +public inline fun T.run(block: T.() -> R): R = block() /** - * Calls the specified function [f] with the given [receiver] as its receiver and returns its result. + * Calls the specified function [block] with the given [receiver] as its receiver and returns its result. */ -public inline fun with(receiver: T, f: T.() -> R): R = receiver.f() +public inline fun with(receiver: T, block: T.() -> R): R = receiver.block() /** - * Calls the specified function [f] with `this` value as its receiver and returns `this` value. + * Calls the specified function [block] with `this` value as its receiver and returns `this` value. */ -public inline fun T.apply(f: T.() -> Unit): T { f(); return this } +public inline fun T.apply(block: T.() -> Unit): T { block(); return this } /** - * Calls the specified function [f] with `this` value as its argument and returns its result. + * Calls the specified function [block] with `this` value as its argument and returns its result. */ -public inline fun T.let(f: (T) -> R): R = f(this) +public inline fun T.let(block: (T) -> R): R = block(this)