ru.hnau.jutils.producer.extensions.short.producerExtensionsShortWithByte.kt Maven / Gradle / Ivy
package ru.hnau.jutils.producer.extensions.short
import ru.hnau.jutils.producer.Producer
operator fun Producer.plus(other: Byte) = map { it + other }
operator fun Producer.minus(other: Byte) = map { it - other }
operator fun Producer.times(other: Byte) = map { it * other }
operator fun Producer.div(other: Byte) = map { it / other }
operator fun Producer.rem(other: Byte) = 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)