given_CommutativeApply_ZipTree

given given_CommutativeApply_ZipTree: CommutativeApply[ZipTree]

Value members

Concrete methods

override
def ap[A, B](ff: ZipTree[A => B])(fa: ZipTree[A]): ZipTree[B]
Definition Classes
Apply
override
def map[A, B](fa: ZipTree[A])(f: A => B): ZipTree[B]
Definition Classes
Functor

Inherited methods

@inline
final
def *>[A, B](fa: ZipTree[A])(fb: ZipTree[B]): ZipTree[B]

Alias for productR.

Alias for productR.

Inherited from
Apply
@inline
final
def <*[A, B](fa: ZipTree[A])(fb: ZipTree[B]): ZipTree[A]

Alias for productL.

Alias for productL.

Inherited from
Apply
@inline
final
def <*>[A, B](ff: ZipTree[A => B])(fa: ZipTree[A]): ZipTree[B]

Alias for ap.

Alias for ap.

Inherited from
Apply
def ap10[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap11[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap12[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap13[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap14[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap15[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap16[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap17[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap18[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap19[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap2[A, B, Z](ff: ZipTree[(A, B) => Z])(fa: ZipTree[A], fb: ZipTree[B]): ZipTree[Z]

ap2 is a binary version of ap, defined in terms of ap.

ap2 is a binary version of ap, defined in terms of ap.

Inherited from
Apply
def ap20[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap21[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19], f20: ZipTree[A20]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap22[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19], f20: ZipTree[A20], f21: ZipTree[A21]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap3[A0, A1, A2, Z](f: ZipTree[(A0, A1, A2) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap4[A0, A1, A2, A3, Z](f: ZipTree[(A0, A1, A2, A3) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap5[A0, A1, A2, A3, A4, Z](f: ZipTree[(A0, A1, A2, A3, A4) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap6[A0, A1, A2, A3, A4, A5, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap7[A0, A1, A2, A3, A4, A5, A6, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap8[A0, A1, A2, A3, A4, A5, A6, A7, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def ap9[A0, A1, A2, A3, A4, A5, A6, A7, A8, Z](f: ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8) => Z])(f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8]): ZipTree[Z]
Inherited from
ApplyArityFunctions
def as[A, B](fa: ZipTree[A], b: B): ZipTree[B]

Replaces the A value in F[A] with the supplied value.

Replaces the A value in F[A] with the supplied value.

Example:

scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForList

scala> Functor[List].as(List(1,2,3), "hello")
res0: List[String] = List(hello, hello, hello)
Inherited from
Functor
def compose[G[_] : Apply]: Apply[[α] =>> ZipTree[G[α]]]

Compose an Apply[F] and an Apply[G] into an Apply[λ[α => F[G[α]]]].

Compose an Apply[F] and an Apply[G] into an Apply[λ[α => F[G[α]]]].

Example:

scala> import cats.implicits._

scala> val alo = Apply[List].compose[Option]

scala> alo.product(List(None, Some(true), Some(false)), List(Some(2), None))
res1: List[Option[(Boolean, Int)]] = List(None, None, Some((true,2)), None, Some((false,2)), None)
Inherited from
Apply
def compose[G[_] : Invariant]: Invariant[[α] =>> ZipTree[G[α]]]

Compose Invariant F[_] and G[_] then produce Invariant[F[G[_]]] using their imap.

Compose Invariant F[_] and G[_] then produce Invariant[F[G[_]]] using their imap.

Example:

scala> import cats.implicits._
scala> import scala.concurrent.duration._

scala> val durSemigroupList: Semigroup[List[FiniteDuration]] =
    | Invariant[Semigroup].compose[List].imap(Semigroup[List[Long]])(Duration.fromNanos)(_.toNanos)
scala> durSemigroupList.combine(List(2.seconds, 3.seconds), List(4.seconds))
res1: List[FiniteDuration] = List(2 seconds, 3 seconds, 4 seconds)
Inherited from
Invariant
def compose[G[_] : Functor]: Functor[[α] =>> ZipTree[G[α]]]
Inherited from
Functor
def composeApply[G[_] : Apply]: InvariantSemigroupal[[α] =>> ZipTree[G[α]]]
Inherited from
InvariantSemigroupal
override
def composeContravariant[G[_] : Contravariant]: Contravariant[[α] =>> ZipTree[G[α]]]
Definition Classes
Functor -> Invariant
Inherited from
Functor
def composeFunctor[G[_] : Functor]: Invariant[[α] =>> ZipTree[G[α]]]

Compose Invariant F[_] and Functor G[_] then produce Invariant[F[G[_]]] using F's imap and G's map.

Compose Invariant F[_] and Functor G[_] then produce Invariant[F[G[_]]] using F's imap and G's map.

Example:

scala> import cats.implicits._
scala> import scala.concurrent.duration._

scala> val durSemigroupList: Semigroup[List[FiniteDuration]] =
    | Invariant[Semigroup]
    |   .composeFunctor[List]
    |   .imap(Semigroup[List[Long]])(Duration.fromNanos)(_.toNanos)
scala> durSemigroupList.combine(List(2.seconds, 3.seconds), List(4.seconds))
res1: List[FiniteDuration] = List(2 seconds, 3 seconds, 4 seconds)
Inherited from
Invariant
final
def fmap[A, B](fa: ZipTree[A])(f: A => B): ZipTree[B]

Alias for map, since map can't be injected as syntax if the implementing type already had a built-in .map method.

Alias for map, since map can't be injected as syntax if the implementing type already had a built-in .map method.

Example:

scala> import cats.implicits._

scala> val m: Map[Int, String] = Map(1 -> "hi", 2 -> "there", 3 -> "you")

scala> m.fmap(_ ++ "!")
res0: Map[Int,String] = Map(1 -> hi!, 2 -> there!, 3 -> you!)
Inherited from
Functor
def fproduct[A, B](fa: ZipTree[A])(f: A => B): ZipTree[(A, B)]

Tuple the values in fa with the result of applying a function with the value

Tuple the values in fa with the result of applying a function with the value

Example:

scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForOption

scala> Functor[Option].fproduct(Option(42))(_.toString)
res0: Option[(Int, String)] = Some((42,42))
Inherited from
Functor
def fproductLeft[A, B](fa: ZipTree[A])(f: A => B): ZipTree[(B, A)]

Pair the result of function application with A.

Pair the result of function application with A.

Example:

scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForOption

scala> Functor[Option].fproductLeft(Option(42))(_.toString)
res0: Option[(String, Int)] = Some((42,42))
Inherited from
Functor
@noop
def ifF[A](fb: ZipTree[Boolean])(ifTrue: => A, ifFalse: => A): ZipTree[A]

Lifts if to Functor

Lifts if to Functor

Example:

scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForList

scala> Functor[List].ifF(List(true, false, false))(1, 0)
res0: List[Int] = List(1, 0, 0)
Inherited from
Functor
override
def imap[A, B](fa: ZipTree[A])(f: A => B)(g: B => A): ZipTree[B]
Definition Classes
Functor -> Invariant
Inherited from
Functor
def lift[A, B](f: A => B): ZipTree[A] => ZipTree[B]

Lift a function f to operate on Functors

Lift a function f to operate on Functors

Example:

scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForOption

scala> val o = Option(42)
scala> Functor[Option].lift((x: Int) => x + 10)(o)
res0: Option[Int] = Some(52)
Inherited from
Functor
def map10[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map11[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map12[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map13[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map14[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map15[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map16[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map17[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map18[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map19[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map2[A, B, Z](fa: ZipTree[A], fb: ZipTree[B])(f: (A, B) => Z): ZipTree[Z]

Applies the pure (binary) function f to the effectful values fa and fb.

Applies the pure (binary) function f to the effectful values fa and fb.

map2 can be seen as a binary version of cats.Functor#map.

Example:

scala> import cats.implicits._

scala> val someInt: Option[Int] = Some(3)
scala> val noneInt: Option[Int] = None
scala> val someLong: Option[Long] = Some(4L)
scala> val noneLong: Option[Long] = None

scala> Apply[Option].map2(someInt, someLong)((i, l) => i.toString + l.toString)
res0: Option[String] = Some(34)

scala> Apply[Option].map2(someInt, noneLong)((i, l) => i.toString + l.toString)
res0: Option[String] = None

scala> Apply[Option].map2(noneInt, noneLong)((i, l) => i.toString + l.toString)
res0: Option[String] = None

scala> Apply[Option].map2(noneInt, someLong)((i, l) => i.toString + l.toString)
res0: Option[String] = None
Inherited from
Apply
def map20[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map21[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19], f20: ZipTree[A20])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map22[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19], f20: ZipTree[A20], f21: ZipTree[A21])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map2Eval[A, B, Z](fa: ZipTree[A], fb: Eval[ZipTree[B]])(f: (A, B) => Z): Eval[ZipTree[Z]]

Similar to map2 but uses Eval to allow for laziness in the F[B] argument. This can allow for "short-circuiting" of computations.

Similar to map2 but uses Eval to allow for laziness in the F[B] argument. This can allow for "short-circuiting" of computations.

NOTE: the default implementation of map2Eval does not short-circuit computations. For data structures that can benefit from laziness, Apply instances should override this method.

In the following example, x.map2(bomb)(_ + _) would result in an error, but map2Eval "short-circuits" the computation. x is None and thus the result of bomb doesn't even need to be evaluated in order to determine that the result of map2Eval should be None.

scala> import cats.{Eval, Later}
scala> import cats.implicits._
scala> val bomb: Eval[Option[Int]] = Later(sys.error("boom"))
scala> val x: Option[Int] = None
scala> x.map2Eval(bomb)(_ + _).value
res0: Option[Int] = None
Inherited from
Apply
def map3[A0, A1, A2, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2])(f: (A0, A1, A2) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map4[A0, A1, A2, A3, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3])(f: (A0, A1, A2, A3) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map5[A0, A1, A2, A3, A4, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4])(f: (A0, A1, A2, A3, A4) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map6[A0, A1, A2, A3, A4, A5, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5])(f: (A0, A1, A2, A3, A4, A5) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map7[A0, A1, A2, A3, A4, A5, A6, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6])(f: (A0, A1, A2, A3, A4, A5, A6) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map8[A0, A1, A2, A3, A4, A5, A6, A7, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7])(f: (A0, A1, A2, A3, A4, A5, A6, A7) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
def map9[A0, A1, A2, A3, A4, A5, A6, A7, A8, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8) => Z): ZipTree[Z]
Inherited from
ApplyArityFunctions
override
def product[A, B](fa: ZipTree[A], fb: ZipTree[B]): ZipTree[(A, B)]
Definition Classes
Apply -> Semigroupal
Inherited from
Apply
def productL[A, B](fa: ZipTree[A])(fb: ZipTree[B]): ZipTree[A]

Compose two actions, discarding any value produced by the second.

Compose two actions, discarding any value produced by the second.

See also

productR to discard the value of the first instead. Example:

scala> import cats.implicits._
scala> import cats.data.Validated
scala> import Validated.{Valid, Invalid}
scala> type ErrOr[A] = Validated[String, A]
scala> val validInt: ErrOr[Int] = Valid(3)
scala> val validBool: ErrOr[Boolean] = Valid(true)
scala> val invalidInt: ErrOr[Int] = Invalid("Invalid int.")
scala> val invalidBool: ErrOr[Boolean] = Invalid("Invalid boolean.")
scala> Apply[ErrOr].productL(validInt)(validBool)
res0: ErrOr[Int] = Valid(3)
scala> Apply[ErrOr].productL(invalidInt)(validBool)
res1: ErrOr[Int] = Invalid(Invalid int.)
scala> Apply[ErrOr].productL(validInt)(invalidBool)
res2: ErrOr[Int] = Invalid(Invalid boolean.)
scala> Apply[ErrOr].productL(invalidInt)(invalidBool)
res3: ErrOr[Int] = Invalid(Invalid int.Invalid boolean.)
Inherited from
Apply
def productR[A, B](fa: ZipTree[A])(fb: ZipTree[B]): ZipTree[B]

Compose two actions, discarding any value produced by the first.

Compose two actions, discarding any value produced by the first.

See also

productL to discard the value of the second instead. Example:

scala> import cats.implicits._
scala> import cats.data.Validated
scala> import Validated.{Valid, Invalid}
scala> type ErrOr[A] = Validated[String, A]
scala> val validInt: ErrOr[Int] = Valid(3)
scala> val validBool: ErrOr[Boolean] = Valid(true)
scala> val invalidInt: ErrOr[Int] = Invalid("Invalid int.")
scala> val invalidBool: ErrOr[Boolean] = Invalid("Invalid boolean.")
scala> Apply[ErrOr].productR(validInt)(validBool)
res0: ErrOr[Boolean] = Valid(true)
scala> Apply[ErrOr].productR(invalidInt)(validBool)
res1: ErrOr[Boolean] = Invalid(Invalid int.)
scala> Apply[ErrOr].productR(validInt)(invalidBool)
res2: ErrOr[Boolean] = Invalid(Invalid boolean.)
scala> Apply[ErrOr].productR(invalidInt)(invalidBool)
res3: ErrOr[Boolean] = Invalid(Invalid int.Invalid boolean.)
Inherited from
Apply
def tuple10[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)]
Inherited from
ApplyArityFunctions
def tuple11[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)]
Inherited from
ApplyArityFunctions
def tuple12[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)]
Inherited from
ApplyArityFunctions
def tuple13[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)]
Inherited from
ApplyArityFunctions
def tuple14[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)]
Inherited from
ApplyArityFunctions
def tuple15[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)]
Inherited from
ApplyArityFunctions
def tuple16[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)]
Inherited from
ApplyArityFunctions
def tuple17[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)]
Inherited from
ApplyArityFunctions
def tuple18[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)]
Inherited from
ApplyArityFunctions
def tuple19[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)]
Inherited from
ApplyArityFunctions
def tuple2[A, B](f1: ZipTree[A], f2: ZipTree[B]): ZipTree[(A, B)]
Inherited from
ApplyArityFunctions
def tuple20[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)]
Inherited from
ApplyArityFunctions
def tuple21[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19], f20: ZipTree[A20]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)]
Inherited from
ApplyArityFunctions
def tuple22[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8], f9: ZipTree[A9], f10: ZipTree[A10], f11: ZipTree[A11], f12: ZipTree[A12], f13: ZipTree[A13], f14: ZipTree[A14], f15: ZipTree[A15], f16: ZipTree[A16], f17: ZipTree[A17], f18: ZipTree[A18], f19: ZipTree[A19], f20: ZipTree[A20], f21: ZipTree[A21]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)]
Inherited from
ApplyArityFunctions
def tuple3[A0, A1, A2, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2]): ZipTree[(A0, A1, A2)]
Inherited from
ApplyArityFunctions
def tuple4[A0, A1, A2, A3, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3]): ZipTree[(A0, A1, A2, A3)]
Inherited from
ApplyArityFunctions
def tuple5[A0, A1, A2, A3, A4, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4]): ZipTree[(A0, A1, A2, A3, A4)]
Inherited from
ApplyArityFunctions
def tuple6[A0, A1, A2, A3, A4, A5, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5]): ZipTree[(A0, A1, A2, A3, A4, A5)]
Inherited from
ApplyArityFunctions
def tuple7[A0, A1, A2, A3, A4, A5, A6, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6]): ZipTree[(A0, A1, A2, A3, A4, A5, A6)]
Inherited from
ApplyArityFunctions
def tuple8[A0, A1, A2, A3, A4, A5, A6, A7, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7)]
Inherited from
ApplyArityFunctions
def tuple9[A0, A1, A2, A3, A4, A5, A6, A7, A8, Z](f0: ZipTree[A0], f1: ZipTree[A1], f2: ZipTree[A2], f3: ZipTree[A3], f4: ZipTree[A4], f5: ZipTree[A5], f6: ZipTree[A6], f7: ZipTree[A7], f8: ZipTree[A8]): ZipTree[(A0, A1, A2, A3, A4, A5, A6, A7, A8)]
Inherited from
ApplyArityFunctions
def tupleLeft[A, B](fa: ZipTree[A], b: B): ZipTree[(B, A)]

Tuples the A value in F[A] with the supplied B value, with the B value on the left.

Tuples the A value in F[A] with the supplied B value, with the B value on the left.

Example:

scala> import scala.collection.immutable.Queue
scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForQueue

scala> Functor[Queue].tupleLeft(Queue("hello", "world"), 42)
res0: scala.collection.immutable.Queue[(Int, String)] = Queue((42,hello), (42,world))
Inherited from
Functor
def tupleRight[A, B](fa: ZipTree[A], b: B): ZipTree[(A, B)]

Tuples the A value in F[A] with the supplied B value, with the B value on the right.

Tuples the A value in F[A] with the supplied B value, with the B value on the right.

Example:

scala> import scala.collection.immutable.Queue
scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForQueue

scala> Functor[Queue].tupleRight(Queue("hello", "world"), 42)
res0: scala.collection.immutable.Queue[(String, Int)] = Queue((hello,42), (world,42))
Inherited from
Functor
@noop
def unzip[A, B](fab: ZipTree[(A, B)]): (ZipTree[A], ZipTree[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.Functor
scala> import cats.implicits.catsStdInstancesForList

scala> Functor[List].unzip(List((1,2), (3, 4)))
res0: (List[Int], List[Int]) = (List(1, 3),List(2, 4))
Inherited from
Functor
def void[A](fa: ZipTree[A]): ZipTree[Unit]

Empty the fa of the values, preserving the structure

Empty the fa of the values, preserving the structure

Example:

scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForList

scala> Functor[List].void(List(1,2,3))
res0: List[Unit] = List((), (), ())
Inherited from
Functor
def widen[A, B >: A](fa: ZipTree[A]): ZipTree[B]

Lifts natural subtyping covariance of covariant Functors.

Lifts natural subtyping covariance of covariant Functors.

NOTE: In certain (perhaps contrived) situations that rely on universal equality this can result in a ClassCastException, because it is implemented as a type cast. It could be implemented as map(identity), but according to the functor laws, that should be equal to fa, and a type cast is often much more performant. See this example of widen creating a ClassCastException.

Example:

scala> import cats.Functor
scala> import cats.implicits.catsStdInstancesForOption

scala> val s = Some(42)
scala> Functor[Option].widen(s)
res0: Option[Int] = Some(42)
Inherited from
Functor

Deprecated and Inherited methods

@noop @deprecated("Dangerous method, use ifM (a flatMap) or ifF (a map) instead", "2.6.2")
def ifA[A](fcond: ZipTree[Boolean])(ifTrue: ZipTree[A], ifFalse: ZipTree[A]): ZipTree[A]
Deprecated
Inherited from
Apply