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

commonMain.extensions.Any.kt Maven / Gradle / Ivy

package io.fluidsonic.stdlib

import kotlin.contracts.*


internal expect inline fun  T.freeze(): T


public inline fun  T?.ifNull(defaultValue: () -> T): T {
	contract {
		callsInPlace(defaultValue, InvocationKind.AT_MOST_ONCE)
	}

	return this ?: defaultValue()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy