A Getter is an optic that allows to see into a structure and getting a focus.
A Getter can be seen as a get function:
Check if all targets satisfy the predicate
true if at least one focus matches the given predicate.
Join two Fold with the same target
Join two Getter with the same focus
Check whether at least one element satisfies the predicate.
Find the first element matching the predicate, if one exists.
Create a product of the Getter and a type C
Get the first target or null
open fun fold(M: Monoid<A>, source: S): A
Fold using the given Monoid instance.
open override fun <R> foldMap( M: Monoid<R>, source: S, map: (A) -> R): R
Map each target to a type R and use a Monoid to fold the results
abstract fun get(source: S): A
Get all targets of the Fold
Check if there is no target
Check if there is at least one target
Get the last target or null
Create a sum of the Getter and type C
Create a sum of type C and the Getter
Create a product of type C and the Getter
Calculate the number of targets
Zip two Getter optics with the same source S
DSL to compose At with a Getter for a structure S to focus in on A at given index I.