ifApply

inline fun <T> T.ifApply(expression: Boolean, block: T.() -> Unit, otherwise: T.() -> Unit): T

An extension function that evaluates the expression and invokes the provided block if true or the otherwise block is false.