Packages

c

cats.syntax

FunctorTuple2Ops

final class FunctorTuple2Ops[F[_], A, B] extends AnyVal

Source
functor.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FunctorTuple2Ops
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FunctorTuple2Ops(fab: F[(A, B)])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. def _1F(implicit F: Functor[F]): F[A]

    Lifts Tuple2#_1 to Functor

    Lifts Tuple2#_1 to Functor

    scala> import cats.data.Chain
    scala> import cats.syntax.functor._
    
    scala> Chain((1, 2), (3, 4), (5, 6))._1F == Chain(1, 3, 5)
    res0: Boolean = true
  5. def _2F(implicit F: Functor[F]): F[B]

    Lifts Tuple2#_2 to Functor

    Lifts Tuple2#_2 to Functor

    scala> import cats.data.Chain
    scala> import cats.syntax.functor._
    
    scala> Chain((1, 2), (3, 4), (5, 6))._2F == Chain(2, 4, 6)
    res0: Boolean = true
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  8. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  9. def swapF(implicit F: Functor[F]): F[(B, A)]

    Lifts Tuple2#swap to Functor

    Lifts Tuple2#swap to Functor

    scala> import cats.data.Chain
    scala> import cats.syntax.functor._
    
    scala> Chain((1, 2), (3, 4), (5, 6)).swapF == Chain((2, 1), (4, 3), (6, 5))
    res0: Boolean = true
  10. def toString(): String
    Definition Classes
    Any
  11. def unzip(implicit F: Functor[F]): (F[A], F[B])

    Un-zips an F[(A, B)] consisting of element pairs or Tuple2 into two separate F's tupled.

    Un-zips an F[(A, B)] consisting of element pairs or Tuple2 into two separate F's tupled.

    NOTE: Check for effect duplication, possibly memoize before

    scala> import cats.data.Chain
    scala> import cats.syntax.functor._
    
    scala> Chain((1, 2), (3, 4), (5, 6)).unzip == ((Chain(1, 3, 5), Chain(2, 4, 6)))
    res0: Boolean = true

Inherited from AnyVal

Inherited from Any

Ungrouped