Skip to content

Instantly share code, notes, and snippets.

@atimca
Created June 19, 2020 09:07
Show Gist options
  • Save atimca/12981cb4b4cf621e06a421c49d9c7d41 to your computer and use it in GitHub Desktop.
Save atimca/12981cb4b4cf621e06a421c49d9c7d41 to your computer and use it in GitHub Desktop.
func combine(_ reducers: Reducer...) -> Reducer {
return { state, event in
reducers.reduce(state) { state, reducer in
reducer(state, event)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment