{"action":"created","issue":{"url":"https://api.github.com/repos/redux-effects/redux-effects/issues/2","labels_url":"https://api.github.com/repos/redux-effects/redux-effects/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/redux-effects/redux-effects/issues/2/comments","events_url":"https://api.github.com/repos/redux-effects/redux-effects/issues/2/events","html_url":"https://github.com/redux-effects/redux-effects/issues/2","id":104034984,"number":2,"title":"Is this the interpreter pattern?","user":{"login":"AriaMinaei","id":593118,"avatar_url":"https://avatars.githubusercontent.com/u/593118?v=3","gravatar_id":"","url":"https://api.github.com/users/AriaMinaei","html_url":"https://github.com/AriaMinaei","followers_url":"https://api.github.com/users/AriaMinaei/followers","following_url":"https://api.github.com/users/AriaMinaei/following{/other_user}","gists_url":"https://api.github.com/users/AriaMinaei/gists{/gist_id}","starred_url":"https://api.github.com/users/AriaMinaei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AriaMinaei/subscriptions","organizations_url":"https://api.github.com/users/AriaMinaei/orgs","repos_url":"https://api.github.com/users/AriaMinaei/repos","events_url":"https://api.github.com/users/AriaMinaei/events{/privacy}","received_events_url":"https://api.github.com/users/AriaMinaei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-31T11:26:04Z","updated_at":"2015-08-31T17:58:26Z","closed_at":null,"body":"I'm still wrapping my head around all the functional patterns. Reading redux-effects, it looks similar to the Free monad with an interpreter.\r\n\r\nIf it is, would it make sense for it to implement the fantasy-land spec so we can use it with the other familiar tools built around fantasy-land?"},"comment":{"url":"https://api.github.com/repos/redux-effects/redux-effects/issues/comments/136445552","html_url":"https://github.com/redux-effects/redux-effects/issues/2#issuecomment-136445552","issue_url":"https://api.github.com/repos/redux-effects/redux-effects/issues/2","id":136445552,"user":{"login":"AriaMinaei","id":593118,"avatar_url":"https://avatars.githubusercontent.com/u/593118?v=3","gravatar_id":"","url":"https://api.github.com/users/AriaMinaei","html_url":"https://github.com/AriaMinaei","followers_url":"https://api.github.com/users/AriaMinaei/followers","following_url":"https://api.github.com/users/AriaMinaei/following{/other_user}","gists_url":"https://api.github.com/users/AriaMinaei/gists{/gist_id}","starred_url":"https://api.github.com/users/AriaMinaei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AriaMinaei/subscriptions","organizations_url":"https://api.github.com/users/AriaMinaei/orgs","repos_url":"https://api.github.com/users/AriaMinaei/repos","events_url":"https://api.github.com/users/AriaMinaei/events{/privacy}","received_events_url":"https://api.github.com/users/AriaMinaei/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T17:58:25Z","updated_at":"2015-08-31T17:58:25Z","body":"Yes, the wiki link you provided seems to be about the same thing. I found the pattern in Haskell literature. The goal seems to be similar to redux-effects` goal.\r\n\r\nThe basic idea is that you accumulate the intents of some action into some sort of container (e.g. `read cookie A`, then `read cookie B`, then `transform their value into some string`, then `send the string to the server`, and finally `return something based on the server's response`), and then hand the container to an interpreter to perform the side-effects.\r\n\r\nThe container can be a Free monad, which would enable us to declaratively write the intents of a function while using the methods available to all monads, so the code doesn't look too cryptic. [This SO answer](http://programmers.stackexchange.com/a/242803/16536) describes the pattern very well.\r\n\r\nAnyway, I don't know how sensible it would be to re-implement the pattern in JS similar to how it's implemented in Haskell, but it's worth exploring. It might yield a clean and familiar syntax.\r\n\r\nI should also mention [fantasy-frees](https://github.com/fantasyland/fantasy-frees) which is actively exploring this idea."}}