Skip to content

Commit

Permalink
Merge branch 'master' of github.com:TinkoffCreditSystems/tofu
Browse files Browse the repository at this point in the history
  • Loading branch information
Odomontois committed Sep 23, 2020
2 parents bd8b91d + e97cd96 commit a8f8ef3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions streams/src/main/scala/tofu/syntax/streams/merge.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package tofu.syntax.streams

import tofu.streams.Merge

object merge {

implicit final class MergeOps[F[_], A](private val fa: F[A]) extends AnyVal {
def merge(that: F[A])(implicit ev: Merge[F]): F[A] = ev.merge(fa)(that)
}
}
11 changes: 11 additions & 0 deletions streams/src/main/scala/tofu/syntax/streams/parFlatten.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package tofu.syntax.streams

import tofu.streams.ParFlatten

object parFlatten {

implicit final class ParFlattenOps[F[_], A](private val ffa: F[F[A]]) extends AnyVal {
def parFlatten(maxConcurrent: Int)(implicit ev: ParFlatten[F]): F[A] = ev.parFlatten(ffa)(maxConcurrent)
def parFlattenUnbounded(implicit ev: ParFlatten[F]): F[A] = ev.parFlattenUnbounded(ffa)
}
}

0 comments on commit a8f8ef3

Please sign in to comment.