Last active
July 2, 2020 07:41
-
-
Save stevencurtis/68eca7fb387d47c9d5df81e72c318be1 to your computer and use it in GitHub Desktop.
mvireducer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Reducer { | |
func getNext(store: BehaviorRelay<State>) -> AppState { | |
let currentState = store.value | |
return AppState( | |
person: currentState.person, | |
currentIndex: (currentState.currentIndex + 1) % currentState.person.count) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment