Trait/Object

cats.arrow

Strong

Related Docs: object Strong | package arrow

Permalink

trait Strong[F[_, _]] extends Profunctor[F] with Serializable

Must obey the laws defined in cats.laws.StrongLaws.

Linear Supertypes
Profunctor[F], Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Strong
  2. Profunctor
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def dimap[A, B, C, D](fab: F[A, B])(f: (C) ⇒ A)(g: (B) ⇒ D): F[C, D]

    Permalink

    Contramap on the first type parameter and map on the second type parameter

    Contramap on the first type parameter and map on the second type parameter

    Example:

    scala> import cats.implicits._
    scala> import cats.arrow.Profunctor
    scala> val fab: Double => Double = x => x + 0.3
    scala> val f: Int => Double = x => x.toDouble / 2
    scala> val g: Double => Double = x => x * 3
    scala> val h = Profunctor[Function1].dimap(fab)(f)(g)
    scala> h(3)
    res0: Double = 5.4
    Definition Classes
    Profunctor
  2. abstract def first[A, B, C](fa: F[A, B]): F[(A, C), (B, C)]

    Permalink

    Create a new F that takes two inputs, but only modifies the first input

    Create a new F that takes two inputs, but only modifies the first input

    Example:

    scala> import cats.implicits._
    scala> import cats.arrow.Strong
    scala> val f: Int => Int = _ * 2
    scala> val fab = Strong[Function1].first[Int,Int,Int](f)
    scala> fab((2,3))
    res0: (Int, Int) = (4,3)
  3. abstract def second[A, B, C](fa: F[A, B]): F[(C, A), (C, B)]

    Permalink

    Create a new F that takes two inputs, but only modifies the second input

    Create a new F that takes two inputs, but only modifies the second input

    Example:

    scala> import cats.implicits._
    scala> import cats.arrow.Strong
    scala> val f: Int => Int = _ * 2
    scala> val fab = Strong[Function1].second[Int,Int,Int](f)
    scala> fab((2,3))
    res0: (Int, Int) = (2,6)

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. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  12. def lmap[A, B, C](fab: F[A, B])(f: (C) ⇒ A): F[C, B]

    Permalink

    contramap on the first type parameter

    contramap on the first type parameter

    Definition Classes
    Profunctor
  13. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  16. def rmap[A, B, C](fab: F[A, B])(f: (B) ⇒ C): F[A, C]

    Permalink

    map on the second type parameter

    map on the second type parameter

    Definition Classes
    Profunctor
  17. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from Profunctor[F]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped