-
fold(for:)
Extension methodProvides a Fold focused on the items of the field given by a key path.
Declaration
Swift
static func fold<T>(for path: WritableKeyPath<Self, Array<T>>) -> Fold<Self, T>
Parameters
path
Key path to a field containing an array of items.
Return Value
A Fold optic focused on the items of the specified field.
-
fold(for:)
Extension methodProvides a Fold focused on the items of the field given by a key path.
Parameters
path
Key path to a field containing an
ArrayK
of items.Return Value
A Fold optic focused on the items of the specified field.
-
fold(for:)
Extension method