trait EqualIdentity[A] extends AssociativeEqual[A] with Identity[A]
- Alphabetic
- By Inheritance
- EqualIdentity
- Identity
- AssociativeEqual
- Equal
- Associative
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def combine(l: => A, r: => A): A
- Definition Classes
- Associative
- abstract def identity: A
The identity element.
The identity element.
- Definition Classes
- Identity
Concrete Value Members
- final def both[B](that: => Equal[B]): Equal[(A, B)]
Constructs an
Equal[(A, B)]
given anEqual[A]
andEqual[B]
by first comparing theA
values for equality and then comparing theB
values for equality, if necessary.Constructs an
Equal[(A, B)]
given anEqual[A]
andEqual[B]
by first comparing theA
values for equality and then comparing theB
values for equality, if necessary.- Definition Classes
- Equal
- final def bothWith[B, C](that: => Equal[B])(f: (C) => (A, B)): Equal[C]
Constructs an
Equal[C]
given anEqual[A]
, anEqual[B]
and a functionf
to transform aC
value into an(A, B)
.Constructs an
Equal[C]
given anEqual[A]
, anEqual[B]
and a functionf
to transform aC
value into an(A, B)
. The instance will convert eachC
value into an(A, B)
, compare theA
values for equality, and then compare theB
values for equality if necessary.- Definition Classes
- Equal
- def contramap[B](f: (B) => A): Equal[B]
Constructs an
Equal[B]
given anEqual[A]
and a functionf
to transform aB
value into anA
value.Constructs an
Equal[B]
given anEqual[A]
and a functionf
to transform aB
value into anA
value. The instance will convert eachB
value into anA
and the compare theA
values for equality.- Definition Classes
- Equal
- final def either[B](that: => Equal[B]): Equal[Either[A, B]]
Constructs an
Equal[Either[A, B]]
given anEqual[A]
and anEqual[B]
.Constructs an
Equal[Either[A, B]]
given anEqual[A]
and anEqual[B]
. The instance will compare theEither[A, B]
values and if both areRight
orLeft
compare them for equality.- Definition Classes
- Equal
- final def eitherWith[B, C](that: => Equal[B])(f: (C) => Either[A, B]): Equal[C]
Constructs an
Equal[C]
given anEqual[A]
, anEqual[B]
, and a functionf
to transform aC
value into anEither[A, B]
.Constructs an
Equal[C]
given anEqual[A]
, anEqual[B]
, and a functionf
to transform aC
value into anEither[A, B]
. The instance will convert eachC
value into anEither[A, B]
and then if both areRight
orLeft
compare them for equality.- Definition Classes
- Equal
- final def equal(l: A, r: A): Boolean
Returns whether two values of type
A
are equal.Returns whether two values of type
A
are equal.- Definition Classes
- Equal
- final def intersperse(middle: A): Associative[A]
- Definition Classes
- Associative
- def multiplyOption(n: Int)(a: A): Option[A]
- Definition Classes
- Identity → Associative
- final def notEqual(l: A, r: A): Boolean
Returns whether two values of type
A
are not equal.Returns whether two values of type
A
are not equal.- Definition Classes
- Equal
- final def repeat(a: A)(n: Int): A
- Definition Classes
- Associative
- def toScala[A1 <: A]: Equiv[A1]
- Definition Classes
- Equal