AssociativeFunctor

dev.constructive.eo.compose.AssociativeFunctor
See theAssociativeFunctor companion object
trait AssociativeFunctor[F[_, _], Xo, Xi]

Composition algebra for a two-parameter carrier F[_, _]. composeTo threads the focus through inner ∘ outer to produce F[Z, C]; composeFrom unfolds it back. Xo / Xi are the outer / inner optics' existentials; named distinct from Optic#X so composeTo / composeFrom can refinement-type on them. Carriers can specialise by pattern-matching on the outer / inner arguments.

Type parameters

F

carrier

Xi

inner-optic existential

Xo

outer-optic existential

Attributes

Companion
object
Source
AssociativeFunctor.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type Z

Combined existential carried through the composed optic.

Combined existential carried through the composed optic.

Attributes

Source
AssociativeFunctor.scala

Value members

Abstract methods

def composeFrom[S, T, A, B, C, D](xd: F[Z, D], inner: Optic[A, B, C, D, F] { type X = Xi; }, outer: Optic[S, T, A, B, F] { type X = Xo; }): T

Pull-side: unfold F[Z, D] back through inner.from and outer.from.

Pull-side: unfold F[Z, D] back through inner.from and outer.from.

Attributes

Source
AssociativeFunctor.scala
def composeTo[S, T, A, B, C, D](s: S, outer: Optic[S, T, A, B, F] { type X = Xo; }, inner: Optic[A, B, C, D, F] { type X = Xi; }): F[Z, C]

Push-side: outer.to(s) → focus through inner.to → reassemble as F[Z, C].

Push-side: outer.to(s) → focus through inner.to → reassemble as F[Z, C].

Attributes

Source
AssociativeFunctor.scala