Skip to content

Commit

Permalink
uops replace names
Browse files Browse the repository at this point in the history
  • Loading branch information
atroitsky committed Dec 28, 2019
1 parent 50d8ed2 commit a4564cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optics/core/src/main/scala/tofu/optics/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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(_))

Expand Down

0 comments on commit a4564cf

Please sign in to comment.