-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:TinkoffCreditSystems/tofu
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
11
streams/src/main/scala/tofu/syntax/streams/parFlatten.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} | ||
} |