element, providing sequential index with the element. * @param [action] function that takes the index of an element and the element itself * and performs the desired action on the element. */ public inline fun <T> Iterable<T>.forEachIndexed(action: (Int, T) -> Unit): Unit { var index = 0 for (item in this) action(index++, item) } /** * Performs the given [action] on each element. */ @kotlin.internal.HidesMembers public inline fun <T> Iterable<T>.forEach(action: (T) -> Unit): Unit { for (element in this) action(element) }
0, right: Int = 0, bottom: Int = 0) = (layoutParams as ViewGroup.MarginLayoutParams).apply { leftMargin = left topMargin = top rightMargin = right bottomMargin = bottom }