Iterable<T>.map(transform: (T) -> R): MutableList<R> { val destination = emptyMutableList<R>() this.forEach { value -> // Invoke the transform function with the current value val transformedValue = transform(value) destination.add(transformedValue) } return destination }
Iterable<T>.map(transform: (T) -> R): MutableList<R> { val destination = emptyMutableList<R>() this.forEach { value -> // Invoke the transform function with the current value val transformedValue = transform(value) destination.add(transformedValue) } return destination }
* as its receiver and returns `this` value. */ public inline fun <T> T.apply(block: T.() -> Unit): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } block() return this }
* as its receiver and returns `this` value. */ public inline fun <T> T.apply(block: T.() -> Unit): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } block() return this }
* as its receiver and returns `this` value. */ public inline fun <T> T.apply(block: T.() -> Unit): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } block() return this }
* as its receiver and returns `this` value. */ public inline fun <T> T.apply(block: T.() -> Unit): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } block() return this }
* as its receiver and returns `this` value. */ public inline fun <T> T.apply(block: T.() -> Unit): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) } block(this) return this }