Hello I was looking for a method like cond on Either. It would work like so:
object ZIO {
def cond[E, A](predicate: Boolean, error: => E, result: => A): IO[E, A] = if (predicate) ZIO.succeed(result) else ZIO.fail(error)
}
is there another way of doing this? if not would you consider a pr with a method like this?