This file contains hidden or 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
import shapeless._ | |
import scalaz._ | |
import Scalaz._ | |
object console extends App { | |
trait Foo[A] { | |
type B | |
def value: B |
This file contains hidden or 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
def showProcessedCount[F[_]: Concurrent: Timer, A]: Pipe[F, A, A] = stream => | |
fs2.Stream.eval(Ref[F].of(0)).flatMap { count => | |
stream.chunks | |
.evalMap { chunk => | |
count.update(_ + chunk.size).as(chunk) | |
} | |
.flatMap(fs2.Stream.chunk) | |
.concurrently( | |
fs2.Stream |
OlderNewer