Both

zio.prelude.These.Both
final case class Both[+A, +B](left: A, right: B) extends These[A, B]

Attributes

Graph
Supertypes
trait These[A, B]
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

final def &>[A1 >: A : Commutative, C](that: These[A1, C]): These[A1, C]

A symbolic alias for zipParRight.

A symbolic alias for zipParRight.

Attributes

Inherited from:
These
final def *>[A1 >: A : Associative, C](that: These[A1, C]): These[A1, C]

A symbolic alias for zipRight.

A symbolic alias for zipRight.

Attributes

Inherited from:
These
final def <&[A1 >: A : Commutative, C](that: These[A1, C]): These[A1, B]

A symbolic alias for zipParLeft.

A symbolic alias for zipParLeft.

Attributes

Inherited from:
These
final def <&>[A1 >: A : Commutative, C](that: These[A1, C]): These[A1, (B, C)]

A symbolic alias for zipPar.

A symbolic alias for zipPar.

Attributes

Inherited from:
These
final def <*[A1 >: A : Associative, C](that: These[A1, C]): These[A1, B]

A symbolic alias for zipLeft.

A symbolic alias for zipLeft.

Attributes

Inherited from:
These
final def <*>[A1 >: A : Associative, C](that: These[A1, C]): These[A1, (B, C)]

A symbolic alias for zip.

A symbolic alias for zip.

Attributes

Inherited from:
These
final def <+>[A1 >: A : Associative, C](that: => These[A1, C]): These[A1, Either[B, C]]

A symbolic alias for orElseEither.

A symbolic alias for orElseEither.

Attributes

Inherited from:
These
final def >>=[A1 >: A : Associative, C](f: B => These[A1, C]): These[A1, C]

A symbolic alias for flatMap.

A symbolic alias for flatMap.

Attributes

Inherited from:
These
final def bimap[A2, C](f: A => A2, g: B => C): These[A2, C]

Transforms both the A value and the B value with the specified functions f and g.

Transforms both the A value and the B value with the specified functions f and g.

Attributes

Inherited from:
These
final def flatMap[A1 >: A : Associative, C](f: B => These[A1, C]): These[A1, C]

Returns a new computation based on the successful result of this computation. If this computation contains a success the new computation will be performed, even if this computation also contains errors. Any errors produced by the two computations will be combined using the Associative instance for A. If this computation does not contain a success then the original failure will be returned unchanged.

Returns a new computation based on the successful result of this computation. If this computation contains a success the new computation will be performed, even if this computation also contains errors. Any errors produced by the two computations will be combined using the Associative instance for A. If this computation does not contain a success then the original failure will be returned unchanged.

Attributes

Inherited from:
These
final def flatten[A1 >: A, C](implicit ev: B <:< These[A1, C], ev2: Associative[A1]): These[A1, C]

Flattens a nested These computation to a single level.

Flattens a nested These computation to a single level.

Attributes

Inherited from:
These
final def flip: These[B, A]

Flips the left and right values.

Flips the left and right values.

Attributes

Inherited from:
These
final def fold[C](left: A => C, right: B => C)(both: (A, B) => C): C

Folds each of the possible cases into a summary value.

Folds each of the possible cases into a summary value.

Attributes

Inherited from:
These
final def forEach[F[_] : Covariant, C](f: B => F[C]): F[These[A, C]]

Transforms the successful result of this computation with the specified effectual function, leaving any error value unchanged.

Transforms the successful result of this computation with the specified effectual function, leaving any error value unchanged.

Attributes

Inherited from:
These
final def isBoth: Boolean

Returns whether this value is a Both.

Returns whether this value is a Both.

Attributes

Inherited from:
These
final def isLeft: Boolean

Returns whether this value is a Left.

Returns whether this value is a Left.

Attributes

Inherited from:
These
final def isRight: Boolean

Returns whether this value is a Right.

Returns whether this value is a Right.

Attributes

Inherited from:
These
final def map[C](f: B => C): These[A, C]

Transforms the B value with the specified function.

Transforms the B value with the specified function.

Attributes

Inherited from:
These
final def mapLeft[A2](f: A => A2): These[A2, B]

Transforms the A value with the specified function.

Transforms the A value with the specified function.

Attributes

Inherited from:
These
final def orElse[A1 >: A : Associative, B1 >: B](that: => These[A1, B1]): These[A1, B1]

Attributes

Inherited from:
These
final def orElseEither[A1 >: A : Associative, C](that: => These[A1, C]): These[A1, Either[B, C]]

Attributes

Inherited from:
These

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def reduceMap[C](f: A => C, g: B => C)(implicit C: Associative[C]): C

Attributes

Inherited from:
These
final def toEither: Either[A, B]

Converts this value to an Either containing a Right if this value contains a success or a Left otherwise, discarding information about any errors in the case of success.

Converts this value to an Either containing a Right if this value contains a success or a Left otherwise, discarding information about any errors in the case of success.

Attributes

Inherited from:
These
final def toOption: Option[B]

Converts this value to an Option containing Some if this value contains a success or None otherwise, discarding information about any errors in the case of success.

Converts this value to an Option containing Some if this value contains a success or None otherwise, discarding information about any errors in the case of success.

Attributes

Inherited from:
These
final def toValidation: Validation[A, B]

Converts this value to a validation success if this value contains a success or a validation failure otherwise, discarding information about any errors in the case of success.

Converts this value to a validation success if this value contains a success or a validation failure otherwise, discarding information about any errors in the case of success.

Attributes

Inherited from:
These
final def toValidationNonEmptyChunk[A1](implicit ev: A <:< NonEmptyChunk[A1]): Validation[A1, B]

Converts this value to a validation success if this value contains a success or a validation failure otherwise, submerging multiple errors into the structure of the validation and discarding information about any errors in the case of success.

Converts this value to a validation success if this value contains a success or a validation failure otherwise, submerging multiple errors into the structure of the validation and discarding information about any errors in the case of success.

Attributes

Inherited from:
These
final def zip[A1 >: A : Associative, C, D](that: These[A1, C]): These[A1, (B, C)]

Combines this computation sequentially with that computation, combining their results into a tuple. If this computation does not return a success that computation will not be performed. If both computations are performed any errors will be combined using the Associative instance for A.

Combines this computation sequentially with that computation, combining their results into a tuple. If this computation does not return a success that computation will not be performed. If both computations are performed any errors will be combined using the Associative instance for A.

Attributes

Inherited from:
These
final def zipLeft[A1 >: A : Associative, C, D](that: These[A1, C]): These[A1, B]

Combines this computation sequentially with that computation, returning only the left value. If this computation does not return a success that computation will not be performed. If both computations are performed any errors will be combined using the Associative instance for A.

Combines this computation sequentially with that computation, returning only the left value. If this computation does not return a success that computation will not be performed. If both computations are performed any errors will be combined using the Associative instance for A.

Attributes

Inherited from:
These
final def zipPar[A1 >: A : Commutative, C, D](that: These[A1, C]): These[A1, (B, C)]

Combines this computation with that computation into a tuple, performing both computations even if this computation does not return a success and combining any errors using the Commutative instance for A.

Combines this computation with that computation into a tuple, performing both computations even if this computation does not return a success and combining any errors using the Commutative instance for A.

Attributes

Inherited from:
These
final def zipParLeft[A1 >: A : Commutative, C, D](that: These[A1, C]): These[A1, B]

Combines this computation with that computation and returning only the left value, performing both computations even if this computation does not return a success and combining any errors using the Commutative instance for A.

Combines this computation with that computation and returning only the left value, performing both computations even if this computation does not return a success and combining any errors using the Commutative instance for A.

Attributes

Inherited from:
These
final def zipParRight[A1 >: A : Commutative, C, D](that: These[A1, C]): These[A1, C]

Combines this computation with that computation and returning only the right value, performing both computations even if this computation does not return a success and combining any errors using the Commutative instance for A.

Combines this computation with that computation and returning only the right value, performing both computations even if this computation does not return a success and combining any errors using the Commutative instance for A.

Attributes

Inherited from:
These
final def zipRight[A1 >: A : Associative, C, D](that: These[A1, C]): These[A1, C]

Combines this computation sequentially with that computation, returning only the right value. If this computation does not return a success that computation will not be performed. If both computations are performed any errors will be combined using the Associative instance for A.

Combines this computation sequentially with that computation, returning only the right value. If this computation does not return a success that computation will not be performed. If both computations are performed any errors will be combined using the Associative instance for A.

Attributes

Inherited from:
These
final def zipWith[A1 >: A : Associative, C, D](that: These[A1, C])(f: (B, C) => D): These[A1, D]

Combines this computation sequentially with that computation, combining their results with the specified function. If this computation does not return a success that computation will not be performed. If both computations are performed any errors will be combined using the Associative instance for A.

Combines this computation sequentially with that computation, combining their results with the specified function. If this computation does not return a success that computation will not be performed. If both computations are performed any errors will be combined using the Associative instance for A.

Attributes

Inherited from:
These
final def zipWithPar[A1 >: A : Commutative, C, D](that: These[A1, C])(f: (B, C) => D): These[A1, D]

Combines this computation with that computation using the specified function, performing both computations even if this computation does not return a success and combining any errors using the Commutative instance for A.

Combines this computation with that computation using the specified function, performing both computations even if this computation does not return a success and combining any errors using the Commutative instance for A.

Attributes

Inherited from:
These