trait
Day[F[_], G[_], A] extends AnyRef
Type Members
-
abstract
type
X
-
abstract
type
Y
Abstract Value Members
-
abstract
val
fx: F[X]
-
abstract
val
gy: G[Y]
-
abstract
def
xya: (X, Y) ⇒ A
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
cobind[B](f: (Day[F, G, A]) ⇒ B): Day[F, G, B]
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
map[B](f: (A) ⇒ B): Day[F, G, B]
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
swapped: Day[G, F, A]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
trans1[H[_]](nat: ~>[F, H]): Day[H, G, A]
-
def
trans2[H[_]](nat: ~>[G, H]): Day[F, H, A]
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
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:
Discussion on Reddit with mention about usage for stream processing and intuition based on liftA2 from Applicative and Day
Phil Freeman blog, connections between Day and Comonads, Comonads transformers, optics
Edward Kmett talk, explains Divisible and Decidable in context of contravariant Day
Bartosz Milewski talk, derive Day from multiplying Functors and using Coyoneda