Swifducks: simple Redux store with multiple reducers

1 ยท Valentin Knabel ยท Oct. 15, 2019, midnight
A simple example implementation of the Redux pattern with multiple reducers and listeners. The name is derived from Swift + Redux = ๐ŸŽ๐Ÿฆ† Originally written at 2018-06-10 Definitions public final class Store<State, Action> { public typealias Reducer = (Action, inout State) -> Void public private(set) var state: State private var reducers: [Reducer] = [] private var callbacks: [Weak<Listener<State>>] = [] public init(initial state: State) { self.state = state } public func select(_ change...