Skip to content

Commit

Permalink
Fixes on tutorial code
Browse files Browse the repository at this point in the history
  • Loading branch information
luisrodero-fidesmo committed Jul 25, 2023
1 parent 84a4648 commit d9ff585
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ import java.io._
// function inputOutputStreams not needed

// transfer will do the real work
def transfer(origin: InputStream, destination: OutputStream): IO[Long] = ???
def transfer(origin: InputStream, destination: OutputStream, buffer: Array[Byte], acc: Long): IO[Long] = ???

def copy(origin: File, destination: File): IO[Long] = {
val inIO: IO[InputStream] = IO.blocking(new FileInputStream(origin))
Expand Down Expand Up @@ -828,7 +828,7 @@ import scala.concurrent.duration.DurationInt

case class State[F[_], A](queue: Queue[A], takers: Queue[Deferred[F,A]])

def producer[F[_]: Sync: Console](id: Int, counterR: Ref[F, Int], stateR: Ref[F, State[F,Int]]): F[Unit] = {
def producer[F[_]: Async: Console](id: Int, counterR: Ref[F, Int], stateR: Ref[F, State[F,Int]]): F[Unit] = {

def offer(i: Int): F[Unit] =
stateR.modify {
Expand Down

0 comments on commit d9ff585

Please sign in to comment.