tofu.streams.Temporal.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tofu-streams_2.13 Show documentation
Show all versions of tofu-streams_2.13 Show documentation
Opinionated set of tools for functional programming in Scala
The newest version!
package tofu.streams
import scala.concurrent.duration.FiniteDuration
trait Temporal[F[_], C[_]] {
/** Divide `F` into groups of elements received within a time window,
* or limited by the number of the elements, whichever happens first.
*/
def groupWithin[A](fa: F[A])(n: Int, d: FiniteDuration): F[C[A]]
}
object Temporal {
def apply[F[_], C[_]](implicit ev: Temporal[F, C]): Temporal[F, C] = ev
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy