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