CanModifyAP

dev.constructive.eo.CanModifyAP
See theCanModifyAP companion object
trait CanModifyAP[S, T, A, B]

Capability: the foci A inside an S can be rewritten effectfully under any Applicative[G] — the carrier-free surface of any optic whose carrier admits forgetful.ForgetfulTraverse[F, Applicative] (Lens, Prism, Optional, Traversal, Fold).

Prefer this trait in consuming signatures; the monomorphic CanModifyA alias covers the common case. For collecting the foci without effects, use CanFold.foci (the raw-optic spelling is the all extension, which needs only a fold). See CanGet for the doctrine and the coherence rule.

Attributes

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

Members list

Value members

Abstract methods

def modifyA[G[_]](f: A => G[B])(using Applicative[G]): S => G[T]

Attributes

Source
CanModifyA.scala