dev.constructive.eo.CanModifyP
See theCanModifyP companion object
Capability: the focused A inside an S can be rewritten to a B, producing a T — the carrier-free surface of any optic whose carrier admits forgetful.ForgetfulFunctor (every writable family: Lens, Iso, Prism, Optional, Traversal, Modify).
Prefer this trait in consuming signatures; the monomorphic CanModify alias covers the common S = T, A = B case. A read-then-write method should demand ONE CanModify (whose modify observes and rewrites in a single pass) rather than split CanGet + CanModify evidence — nothing ties two separately-summoned capabilities to the same optic. See CanGet for the doctrine and the coherence rule.
Attributes
- Companion
- object
- Source
- CanModify.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
Members list
In this article