-
Focuses on a specific index of this lens focus.
Declaration
Swift
func at(_ i: A.AtIndex) -> Lens<S, A.AtFoci>
Parameters
i
Index to focus.
Return Value
A composed lens from this structure to the focused index.
-
Provides a traversal over all elements of the focus of this lens.
Declaration
Swift
var every: Traversal<S, A.EachFoci> { get }
-
Provides an AffineTraversal focused on an index of the focus of this lens.
Declaration
Swift
func index(_ i: A.IndexType) -> AffineTraversal<S, A.IndexFoci>
Parameters
i
Index to focus.
Return Value
An AffineTraversal focused on an index of the focus of this lens.
-
Provides an AffineTraversal focused on an index of the focus of this lens.
Declaration
Swift
subscript(i: A.IndexType) -> AffineTraversal<S, A.IndexFoci> { get }
Parameters
i
Index to focus.
Return Value
An AffineTraversal focused on an index of the focus of this lens.
-
Obtains an identity lens; i.e. a no-op lens.
Declaration
Swift
static var identity: Lens<S, S> { get }
-
Obtains a lens that receives either values of
S
and strips the choice ofS
.Declaration
Swift
static var codiagonal: Lens<Either<S, S>, S> { get }