M apply()

apply command history reducer

Source

M apply() =>
    history.fold(initialStateProvider().initial() as M,
            (M newState, Command<M> c) => c.exec(newState));