             
             let oldState =
             
-            try REQ.value("\(F.name) is in \(From.self) state") {
-                
-                model >> From.self
+            try REQ.value("\(F.name) is in \(S.self) state") {
+                
+                model >> S.self
             }
             
             //===

    let newState: Any
}

#if swift(>=3.2)
    
public

    
#endif

//===

public
extension TransitionOf.Into
{
    static
    func via(
        scope: String = #file,
        context: String = #function,
        // globalModel, become, submit
        body: @escaping (GlobalModel, Wrapped<StateGetter<S>>, @escaping Wrapped<ActionGetter>) throws -> Void
        ) -> Action
    {
        return Action(scope, context, self) { model, submit in
            
            let oldState =
                
            try REQ.value("\(F.name) is presented") {
                
                model >> F.self
            }
            
            //===
            
            var newState: S!
            
            //===
            
            try body(model, { newState = $0() }, submit)
            
            //===
            
            try REQ.isNotNil("New state for \(F.name) is set") {
                
                newState
            }
            
            //===
            
            return (
                { $0 << newState },
                TransitionOf<F>(oldState: oldState, newState: newState)
            )
        }
    }
}

//===
