All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.ansman.deager.Anys.kt Maven / Gradle / Ivy

The newest version!
package se.ansman.deager

fun  T.applyEach(iterable: Iterable, block: T.(E) -> Unit): T = apply {
    for (element in iterable) {
        block(element)
    }
}

fun  T.applyIf(predicate: Boolean, block: T.() -> Unit): T = apply {
    if (predicate) {
        block()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy