trait Day[F[_], G[_], A] extends AnyRef
Covariant Day Convolution
Based on Edward Kmett implementation in Haskell: https://hackage.haskell.org/package/kan-extensions/docs/Data-Functor-Day.html
Day convolution is a special form of Functor multiplication. In monoidal category of endofunctors Applicative is a monoid object when Day covolution is used as tensor. If we use Functor composition as tensor then then monoid form a Monad instead of Applicative.
Can be seen as generalization of method apply2 from Apply:
def apply2(fa => F[A], fb => F[B])(f: (A, B) => C): F[C] trait Day[F[_], G[_], A] { self => // ... val fx: F[X] val gy: G[Y] def xya: (X, Y) => A }
- Self Type
- Day[F, G, A]
- Source
- Day.scala
- See also
Bartosz Milewski talk, derive Day from multiplying Functors and using Coyoneda
Edward Kmett talk, explains Divisible and Decidable in context of contravariant Day
Phil Freeman blog, connections between Day and Comonads, Comonads transformers, optics
- Alphabetic
- By Inheritance
- Day
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def cobind[B](f: (Day[F, G, A]) ⇒ B): Day[F, G, B]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](f: (A) ⇒ B): Day[F, G, B]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
swapped: Day[G, F, A]
Swap type constructors order
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trans1[H[_]](nat: ~>[F, H]): Day[H, G, A]
Apply a natural transformation to the left-hand side of a Day convolution.
-
def
trans2[H[_]](nat: ~>[G, H]): Day[F, H, A]
Apply a natural transformation to the right-hand side of a Day convolution.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()