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

ru.hnau.jutils.producer.extensions.short.producerExtensionsShortWithLong.kt Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package ru.hnau.jutils.producer.extensions.short

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, 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)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy