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

commonMain.kr.jadekim.common.dsl.change.kt Maven / Gradle / Ivy

package kr.jadekim.common.dsl

class ChangeContext(val before: T, val after: T) {

    inline fun T.to(to: T, crossinline block: () -> Unit) {
        if ([email protected] == this && [email protected] == to) {
            block()
        }
    }
}

@Deprecated("Deprecated this function", ReplaceWith("matchChanges"))
inline fun  change(before: T, after: T, crossinline block: ChangeContext.() -> Unit) {
    ChangeContext(before, after).block()
}

inline fun  matchChanges(before: T, after: T, crossinline block: ChangeContext.() -> Unit) {
    ChangeContext(before, after).block()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy