AffineTraversal
public typealias AffineTraversal<S, A> = PAffineTraversal<S, S, A, A>
-
Updates the focus viewed through the
AffineTraversaland returns its new value.Parameters
fUpdating function.
Return Value
A
Statewith the new value. -
Updates the focus viewed through the
AffineTraversaland returns its old value.Parameters
fUpdating function.
Return Value
A
Statewith the old value. -
Updates the focus viewed through the
AffineTraversal, ignoring the result.Declaration
Swift
func update_(_ f: @escaping (A) -> A) -> State<S, ()>Parameters
fUpdating function.
Return Value
A
Stateignoring the result. -
Assigns the focus viewed through the
AffineTraversaland returns its new value.Parameters
aValue to assign the focus.
Return Value
A
Statewith the new value. -
Assigns the focus viewed through the
AffineTraversaland returns its old value.Parameters
aValue to assign the focus.
Return Value
A
Statewith the old value. -
Assigns the focus viewed through the
AffineTraversal, ignoring the result.Declaration
Swift
func assign_(_ a: A) -> State<S, ()>Parameters
aValue to assign the focus.
Return Value
A
Stateignoring the result.
-
Obtains an identity AffineTraversal.
Declaration
Swift
static var identity: AffineTraversal<S, S> { get } -
Obtains an AffineTraversal that takes either an
Sor anSand strips the choice ofS.Declaration
Swift
static var codiagonal: AffineTraversal<Either<S, S>, S> { get }
-
Focuses on a specific index of this AffineTraversal.
Declaration
Swift
func at(_ i: A.AtIndex) -> AffineTraversal<S, A.AtFoci>Parameters
iIndex to focus.
Return Value
An AffineTraversal from this structure to the focused index.
-
Provides a traversal over all elements of the focus of this AffineTraversal.
Declaration
Swift
var every: Traversal<S, A.EachFoci> { get }
-
Provides an AffineTraversal focused on an index of the focus of this AffineTraversal.
Declaration
Swift
func index(_ i: A.IndexType) -> AffineTraversal<S, A.IndexFoci>Parameters
iIndex to focus.
Return Value
An AffineTraversal focused on an index of the focus of this AffineTraversal.
-
Provides an AffineTraversal focused on an index of the focus of this AffineTraversal.
Declaration
Swift
subscript(i: A.IndexType) -> AffineTraversal<S, A.IndexFoci> { get }Parameters
iIndex to focus.
Return Value
An AffineTraversal focused on an index of the focus of this AffineTraversal.
Install in Dash
AffineTraversal Extension Reference