ru.hnau.jutils.producer.extensions.short.producerExtensionsShortWithInt.kt Maven / Gradle / Ivy
package ru.hnau.jutils.producer.extensions.short
import ru.hnau.jutils.producer.Producer
operator fun Producer.plus(other: Int) = map { it + other }
operator fun Producer.minus(other: Int) = map { it - other }
operator fun Producer.times(other: Int) = map { it * other }
operator fun Producer.div(other: Int) = map { it / other }
operator fun Producer.rem(other: Int) = map { it % other }
operator fun Producer.plus(other: Producer) = combineWith(other, Short::plus)
operator fun Producer.minus(other: Producer) = combineWith(other, Short::minus)
operator fun Producer.times(other: Producer) = combineWith(other, Short::times)
operator fun Producer.div(other: Producer) = combineWith(other, Short::div)
operator fun Producer.rem(other: Producer) = combineWith(other, Short::rem)