Skip to content

Commit

Permalink
update documentation (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgfraser authored Sep 27, 2023
1 parent fcb5ba8 commit 3d6f023
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ object ZQueryExample extends ZIOAppDefault {
ZIO.succeed(???)
}

result.either.map(resultMap.insert(request))
result.exit.map(resultMap.insert(request))

case batch: Seq[GetUserName] =>
val result: Task[List[(Int, String)]] = {
Expand All @@ -105,10 +105,10 @@ object ZQueryExample extends ZIOAppDefault {
result.fold(
err =>
requests.foldLeft(resultMap) { case (map, req) =>
map.insert(req)(Left(err))
map.insert(req)(Exit.fail(err))
},
_.foldLeft(resultMap) { case (map, (id, name)) =>
map.insert(GetUserName(id))(Right(name))
map.insert(GetUserName(id))(Exit.succeed(name))
}
)
}
Expand Down

0 comments on commit 3d6f023

Please sign in to comment.