We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cb3efa commit a0ce718Copy full SHA for a0ce718
Sources/FunctionalConfigurator/Configurator.swift
@@ -139,6 +139,15 @@ extension Configurator {
139
_block.configurator.appendingConfiguration { _block.keyPath.embed(value, in: $0) }
140
}
141
142
+ public func set(_ transform: @escaping (inout Value) -> Void) -> Configurator {
143
+ _block.configurator.appendingConfiguration { base in
144
+ _block.keyPath.embed(
145
+ modification(of: _block.keyPath.extract(from: base), with: transform),
146
+ in: base
147
+ )
148
+ }
149
150
+
151
public subscript<LocalValue>(
152
dynamicMember keyPath: WritableKeyPath<Value, LocalValue>
153
) -> CallableBlock<LocalValue> {
0 commit comments