Ajay Chandran
Ajay Chandran
+1 on total function (since it would support both `mapError` and `collectError`).
I meant both combinators can be provided. ```scala def mapError(f: Throwable => Throwable) def collectError(pf: PartialFunction[Throwable, Throwable]) = mapError(pf.applyOrElse(_, identity[Throwable])) ```
This would require adding the [kind-projector](https://github.com/typelevel/kind-projector) plugin though.
> The operator name we want here sounds something like mapToError with implicit evidences for Either[Throwable, _] and Try[_]. How about a specific operator for each datatype like `mapEither` and...
> What are some canonical use cases? I am building a multiplayer card game (similar to Poker) where game updates are published to a client in a (websocket) stream. The...
Looks like I started with an older version of the target branch. Let me know if you want me to resubmit the PR.
@raquo Please review.
I have redesigned the API to support connection management. ```scala // a duplex connection // (Observer[Boolean], Observer[String[, EventStream[String]) val (control, receive, transmit) = WebSocketEventStream.text.open("absolute/url") ``` - a connection is established...
Note that `Try.apply` checks for non-fatal exceptions.
I am not even sure if `UndefinedBehaviorError` exists. I could not find it using Intellij search. The ZIO runtime has a guard only for the [JVM](https://github.com/zio/zio/blob/51b5bbe001cfbe4d71dc4bd9073530c371dff01e/core/jvm/src/main/scala/zio/internal/PlatformSpecific.scala#L85) platform, and not for...