The Idempotent type class describes a binary operator for a type A that is both associative and produces the same value when combining two identical values. This means that a <> a is equal to a for all values a. Example of idempotent operations is union of sets, but not addition of integers.
Idempotent operators are useful because combining the values with an idempotent operation results in the same value regardless of the number of values are combined, allowing us to optimize out unnecessary combinations of the same values.
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
trait EqualIdempotent[A]
- Self type
-
Idempotent[A]
Members list
Value members
Concrete methods
If the values are equal, it doesn't attempt to combine them and promptly returns the first one. If not equal, the values are combined normally.
If the values are equal, it doesn't attempt to combine them and promptly returns the first one. If not equal, the values are combined normally.
Attributes
If the values are equal, it doesn't attempt to combine them and promptly returns the first one. If not equal, the values are combined normally.
If the values are equal, it doesn't attempt to combine them and promptly returns the first one. If not equal, the values are combined normally.
Attributes
If the values are equal, it doesn't attempt to combine them and promptly returns the first one. If not equal, the values are combined normally.
If the values are equal, it doesn't attempt to combine them and promptly returns the first one. If not equal, the values are combined normally.
Attributes
Creates a new instance which internally uses combineIdempotent for combining values.
Creates a new instance which internally uses combineIdempotent for combining values.
Attributes
Creates a new instance which internally uses combineIdempotent for combining values.
Creates a new instance which internally uses combineIdempotent for combining values.
Attributes
Creates a new instance which internally uses combineIdempotent for combining values.
Creates a new instance which internally uses combineIdempotent for combining values.
Attributes
Inherited methods
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative
Attributes
- Inherited from:
- Associative