From a4564cf8bb93547108fd73704819b91eb9550a03 Mon Sep 17 00:00:00 2001 From: atroitsky Date: Sat, 28 Dec 2019 13:31:11 +0300 Subject: [PATCH] uops replace names --- optics/core/src/main/scala/tofu/optics/functions.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optics/core/src/main/scala/tofu/optics/functions.scala b/optics/core/src/main/scala/tofu/optics/functions.scala index 2eb668e91..30834af76 100644 --- a/optics/core/src/main/scala/tofu/optics/functions.scala +++ b/optics/core/src/main/scala/tofu/optics/functions.scala @@ -49,9 +49,9 @@ object functions { def everyTuple4[A, B]: PItems[(A, A, A, A), (B, B, B, B), A, B] = PItems[(A, A, A, A), A, B](implicit A => (s, f) => (f(s._1), f(s._2), f(s._3), f(s._4)).tupled) - def right[A, B]: Subset[Either[A, B], A] = Subset[Either[A, B]](_.fold(Some(_), _ => None))(_.asLeft) + def right[A, B]: Subset[Either[A, B], B] = Subset[Either[A, B]](_.toOption)(_.asRight) - def left[A, B]: Subset[Either[A, B], B] = Subset[Either[A, B]](_.toOption)(_.asRight) + def left[A, B]: Subset[Either[A, B], A] = Subset[Either[A, B]](_.fold(Some(_), _ => None))(_.asLeft) def some[A]: Subset[Option[A], A] = Subset[Option[A]](identity)(Some(_))