org.hnau.emitter.extensions.coerce.EmitterCoerceAtLeastExtensions.kt Maven / Gradle / Ivy
package org.hnau.emitter.extensions.coerce
import org.hnau.emitter.Emitter
import org.hnau.emitter.extensions.map
import org.hnau.emitter.observing.push.lateinit.combine
fun > Emitter.coerceAtLeast(minimumValue: Emitter) =
Emitter.combine(this, minimumValue) { first, second -> first.coerceAtLeast(second) }
fun > Emitter.coerceAtLeast(minimumValue: T) =
map { it.coerceAtLeast(minimumValue) }
fun > T.coerceAtLeast(minimumValue: Emitter) =
minimumValue.map { this.coerceAtLeast(it) }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy