{"action":"created","issue":{"url":"https://api.github.com/repos/ekmett/machines/issues/70","labels_url":"https://api.github.com/repos/ekmett/machines/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/ekmett/machines/issues/70/comments","events_url":"https://api.github.com/repos/ekmett/machines/issues/70/events","html_url":"https://github.com/ekmett/machines/pull/70","id":116741259,"number":70,"title":"Add a new fanout operator which can terminate","user":{"login":"bens","id":37969,"avatar_url":"https://avatars.githubusercontent.com/u/37969?v=3","gravatar_id":"","url":"https://api.github.com/users/bens","html_url":"https://github.com/bens","followers_url":"https://api.github.com/users/bens/followers","following_url":"https://api.github.com/users/bens/following{/other_user}","gists_url":"https://api.github.com/users/bens/gists{/gist_id}","starred_url":"https://api.github.com/users/bens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bens/subscriptions","organizations_url":"https://api.github.com/users/bens/orgs","repos_url":"https://api.github.com/users/bens/repos","events_url":"https://api.github.com/users/bens/events{/privacy}","received_events_url":"https://api.github.com/users/bens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-13T10:23:38Z","updated_at":"2015-11-13T16:49:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ekmett/machines/pulls/70","html_url":"https://github.com/ekmett/machines/pull/70","diff_url":"https://github.com/ekmett/machines/pull/70.diff","patch_url":"https://github.com/ekmett/machines/pull/70.patch"},"body":"I've found the existing fanout functions fairly surprising because they don't terminate, like\r\n> run (source (map (:[]) [1,2,3]))\r\n> [[1],[2],[3]]\r\n> run (fanout [source (map (:[]) [1,2,3])])\r\n> ** hang **\r\n\r\nwith the `(~*>)` operator (happy to take name suggestions), it does\r\n> run (stopped ~*> [source (map (:[]) [1,2,3])])\r\n> [[1,2,3]]\r\n\r\nI've also used difference lists to avoid reversing the list of Processes with each step, but not attached to that if it's a bad idea.  Hoping for some feedback on whether this is wanted or could be improved.\r\n\r\nI can also add a `fanoutSteps` equivalent as well, with a Monoid constraint instead of Semigroup."},"comment":{"url":"https://api.github.com/repos/ekmett/machines/issues/comments/156484917","html_url":"https://github.com/ekmett/machines/pull/70#issuecomment-156484917","issue_url":"https://api.github.com/repos/ekmett/machines/issues/70","id":156484917,"user":{"login":"ekmett","id":304657,"avatar_url":"https://avatars.githubusercontent.com/u/304657?v=3","gravatar_id":"","url":"https://api.github.com/users/ekmett","html_url":"https://github.com/ekmett","followers_url":"https://api.github.com/users/ekmett/followers","following_url":"https://api.github.com/users/ekmett/following{/other_user}","gists_url":"https://api.github.com/users/ekmett/gists{/gist_id}","starred_url":"https://api.github.com/users/ekmett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekmett/subscriptions","organizations_url":"https://api.github.com/users/ekmett/orgs","repos_url":"https://api.github.com/users/ekmett/repos","events_url":"https://api.github.com/users/ekmett/events{/privacy}","received_events_url":"https://api.github.com/users/ekmett/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T16:49:18Z","updated_at":"2015-11-13T16:49:18Z","body":"I'd be curious to see what the feedback we can get here from other folks who use the existing fanout machinery looks like."}}