// define app state struct AppState : StateType { } // define global Store let appStore = Store < AppState >( reducer : /* TODO */ , state : nil ) let appReducer : Reducer < AppState > = { action , state -> AppState in return AppState ( fetchCurrencies : nil ) } let store = Store < AppState >( reducer : appReducer , state : nil ) success ( Data ()) return FetchCurrenciesState ( currencies : result ) default : return nil } } let appReducer : Reducer < AppState > = { action , state -> AppState in return AppState ( fetchCurrencies : currencyReducer ( action , state ?.