trait
Identity[A] extends Associative[A]
Abstract Value Members
-
abstract
def
combine(l: ⇒ A, r: ⇒ A): A
-
abstract
def
identity: A
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
multiplyOption(n: Int)(a: A): Option[A]
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
repeat(a: A)(n: Int): A
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
The
Identity
type class describes an associative binary operator for a typeA
that also has an identity element. Combining any value with the identity element on either the left or the right must return the original value unchanged. For example, zero is an identity element for integer addition and the empty string is an identity element for string concatenation.Operators with an identity element are useful because the identity element provides a sensible default value when combining values of a type and no values exist.