dev.constructive.eo.optics.Getter
See theGetter companion class
object Getter
Constructor for Getter — read-only single-focus optic, backed by Direct with T = B = Unit. .get(s) is the only meaningful operation; the write path is vestigial.
Both the leftover T and the back-focus B are Unit, which makes the read-only-ness explicit in the type (there is no B to put back). Getter.apply returns a concrete Getter, so a Getter composes with another Getter through the ordinary andThen (the fused Getter.andThen) — g1.andThen(g2) reads s => g2.get(g1.get(s)) — exactly as Iso / Lens compose via their own fused subclasses.
Attributes
- Companion
- class
- Source
- Getter.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Getter.type
Members list
In this article