CommutativeIdentity

zio.prelude.coherent.CommutativeIdentity
See theCommutativeIdentity companion object
trait CommutativeIdentity[A] extends Commutative[A], Identity[A]

Attributes

Companion
object
Graph
Supertypes
trait Identity[A]
trait Commutative[A]
trait Associative[A]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def combine(l: => A, r: => A): A

Attributes

Inherited from:
Associative
final def commute: Commutative[A]

Returns a new Commutative instance that describes the same binary operator but applied in reverse order. Since the operation is commutative this instance is guaranteed to return the same results as the original instance but one order of combination or the other may be more efficient in certain cases.

Returns a new Commutative instance that describes the same binary operator but applied in reverse order. Since the operation is commutative this instance is guaranteed to return the same results as the original instance but one order of combination or the other may be more efficient in certain cases.

Attributes

Inherited from:
Commutative
def identity: A

The identity element.

The identity element.

Attributes

Inherited from:
Identity
final def intersperse(middle: A): Associative[A]

Attributes

Inherited from:
Associative
override def multiplyOption(n: Int)(a: A): Option[A]

Attributes

Definition Classes
Inherited from:
Identity
final def repeat(a: A)(n: Int): A

Attributes

Inherited from:
Associative