{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/redux/issues/6","labels_url":"https://api.github.com/repos/gaearon/redux/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/redux/issues/6/comments","events_url":"https://api.github.com/repos/gaearon/redux/issues/6/events","html_url":"https://github.com/gaearon/redux/issues/6","id":84238597,"number":6,"title":"Implement middleware","user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gaearon/redux/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-06-02T22:22:12Z","updated_at":"2015-06-05T15:28:48Z","closed_at":null,"body":"Similar to https://github.com/rpominov/fluce/issues/4"},"comment":{"url":"https://api.github.com/repos/gaearon/redux/issues/comments/109328685","html_url":"https://github.com/gaearon/redux/issues/6#issuecomment-109328685","issue_url":"https://api.github.com/repos/gaearon/redux/issues/6","id":109328685,"user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T15:28:48Z","updated_at":"2015-06-05T15:28:48Z","body":">(state, actions) -> state looks like the reducer function only accepts multiple actions. Or did you mean that the dispatcher outputs the state by calling a callback rather than simply return it?\r\n\r\nIt may simply return it. Seems like this signature enables transactions with no need for async-y things (which is a huge relief). Such dispatcher might look like this:\r\n\r\n```js\r\nexport function dispatcher(...stores) {\r\n  function init() {\r\n    return new Map([\r\n      for (store of stores)\r\n        [store, undefined]\r\n    ]);\r\n  }\r\n\r\n  function step(atom, action) {\r\n    return new Map([\r\n      for ([store, state] of atom)\r\n        [store, store(state, action)]\r\n    ]);\r\n  }\r\n\r\n  return function dispatch(atom = init(), actions = []) {\r\n    return actions.reduce(step, atom);\r\n  };\r\n}\r\n```"}}