Wrap a value in Left
.
Wrap a value in Right
.
Wrap a value to a left EitherNel
Wrap a value to a left EitherNel
For example:
scala> import cats.implicits._, cats.data.NonEmptyList scala> "Err".leftNel[Int] res0: Either[NonEmptyList[String], Int] = Left(NonEmptyList(Err))
Wrap a value to a right EitherNel
Wrap a value to a right EitherNel
For example:
scala> import cats.implicits._, cats.data.NonEmptyList scala> 1.rightNel[String] res0: Either[NonEmptyList[String], Int] = Right(1)