Trait

cats.kernel.instances

Function0Semigroup

Related Doc: package instances

Permalink

trait Function0Semigroup[A] extends Semigroup[() ⇒ A]

Linear Supertypes
Semigroup[() ⇒ A], Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Function0Semigroup
  2. Semigroup
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. implicit abstract def A: Semigroup[A]

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def combine(x: () ⇒ A, y: () ⇒ A): () ⇒ A

    Permalink

    Associative operation which combines two values.

    Associative operation which combines two values.

    Example:

    scala> import cats.kernel.instances.string._
    scala> import cats.kernel.instances.int._
    scala> import cats.kernel.instances.option._
    
    scala> Semigroup[String].combine("Hello ", "World!")
    res0: String = Hello World!
    
    scala> Semigroup[Option[Int]].combine(None, Some(1))
    res1: Option[Int] = Some(1)
    Definition Classes
    Function0SemigroupSemigroup
  7. def combineAllOption(as: TraversableOnce[() ⇒ A]): Option[() ⇒ A]

    Permalink

    Given a sequence of as, combine them and return the total.

    Given a sequence of as, combine them and return the total.

    If the sequence is empty, returns None. Otherwise, returns Some(total).

    Example:

    scala> import cats.kernel.instances.string._
    
    scala> Semigroup[String].combineAllOption(List("One ", "Two ", "Three"))
    res0: Option[String] = Some(One Two Three)
    
    scala> Semigroup[String].combineAllOption(List.empty)
    res1: Option[String] = None
    Definition Classes
    Semigroup
  8. def combineN(a: () ⇒ A, n: Int): () ⇒ A

    Permalink

    Return a combined with itself n times.

    Return a combined with itself n times.

    Example:

    scala> import cats.kernel.instances.int._
    scala> import cats.kernel.instances.string._
    
    scala> Semigroup[Int].combineN(1, 10)
    res0: Int = 10
    
    scala> Semigroup[String].combineN("ha", 3)
    res1: String = hahaha
    Definition Classes
    Semigroup
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def repeatedCombineN(a: () ⇒ A, n: Int): () ⇒ A

    Permalink

    Return a combined with itself more than once.

    Return a combined with itself more than once.

    Attributes
    protected[this]
    Definition Classes
    Semigroup
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Semigroup[() ⇒ A]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped