@@ -177,47 +177,47 @@ public final class ValidatingProperty<Value, ValidationError: Swift.Error>: Muta
177177 ) {
178178 self . init ( MutableProperty ( initial) , with: other, validator)
179179 }
180-
181- /// Create a `ValidatingProperty` that presents a mutable validating
182- /// view for an inner mutable property .
180+
181+ /// Create a `ValidatingProperty` which validates mutations before
182+ /// committing them .
183183 ///
184184 /// The proposed value is only committed when `valid` is returned by the
185185 /// `validator` closure.
186186 ///
187187 /// - note: `inner` is retained by the created property.
188188 ///
189189 /// - parameters:
190- /// - inner: The inner property which validated values are committed to.
190+ /// - initial: The initial value of the property. It is not required to
191+ /// pass the validation as specified by `validator`.
191192 /// - other: The property that `validator` depends on.
192193 /// - validator: The closure to invoke for any proposed value to `self`.
193194 public convenience init < U, E> (
194- _ inner : MutableProperty < Value > ,
195+ _ initial : Value ,
195196 with other: ValidatingProperty < U , E > ,
196197 _ validator: @escaping ( Value , U ) -> Decision
197198 ) {
198- self . init ( inner , with: other, validator)
199+ self . init ( MutableProperty ( initial ) , with: other, validator)
199200 }
200201
201- /// Create a `ValidatingProperty` that validates mutations before
202- /// committing them .
202+ /// Create a `ValidatingProperty` that presents a mutable validating
203+ /// view for an inner mutable property .
203204 ///
204205 /// The proposed value is only committed when `valid` is returned by the
205206 /// `validator` closure.
206207 ///
207208 /// - parameters:
208- /// - initial: The initial value of the property. It is not required to
209- /// pass the validation as specified by `validator`.
209+ /// - inner: The inner property which validated values are committed to.
210210 /// - other: The property that `validator` depends on.
211211 /// - validator: The closure to invoke for any proposed value to `self`.
212212 public convenience init < U, E> (
213- _ initial : Value ,
213+ _ inner : MutableProperty < Value > ,
214214 with other: ValidatingProperty < U , E > ,
215215 _ validator: @escaping ( Value , U ) -> Decision
216216 ) {
217217 // Capture only `other.result` but not `other`.
218218 let otherValidations = other. result
219219
220- self . init ( initial ) { input in
220+ self . init ( inner ) { input in
221221 let otherValue : U
222222
223223 switch otherValidations. value {
0 commit comments