{"action":"created","issue":{"url":"https://api.github.com/repos/mindeavor/es-pipeline-operator/issues/21","labels_url":"https://api.github.com/repos/mindeavor/es-pipeline-operator/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/mindeavor/es-pipeline-operator/issues/21/comments","events_url":"https://api.github.com/repos/mindeavor/es-pipeline-operator/issues/21/events","html_url":"https://github.com/mindeavor/es-pipeline-operator/issues/21","id":121601473,"number":21,"title":"First class support for Promises","user":{"login":"kwijibo","id":78849,"avatar_url":"https://avatars.githubusercontent.com/u/78849?v=3","gravatar_id":"","url":"https://api.github.com/users/kwijibo","html_url":"https://github.com/kwijibo","followers_url":"https://api.github.com/users/kwijibo/followers","following_url":"https://api.github.com/users/kwijibo/following{/other_user}","gists_url":"https://api.github.com/users/kwijibo/gists{/gist_id}","starred_url":"https://api.github.com/users/kwijibo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwijibo/subscriptions","organizations_url":"https://api.github.com/users/kwijibo/orgs","repos_url":"https://api.github.com/users/kwijibo/repos","events_url":"https://api.github.com/users/kwijibo/events{/privacy}","received_events_url":"https://api.github.com/users/kwijibo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-10T23:25:52Z","updated_at":"2015-12-17T19:07:51Z","closed_at":null,"body":"The pipeline operator could work like an infix version of [R.pipeP](http://ramdajs.com/docs/#pipeP), allowing asynchronous pipelines to have (nearly?) the same syntax as synchronous ones:\r\n```\r\nfs.readFile('./index.txt')\r\n|> .split('\\n')\r\n    .map(fs.readFile)\r\n|> Promise.all\r\n|> .join(\"\\n\")\r\n|> process.stdout.write\r\n|> .catch(process.stderr.write)\r\n```"},"comment":{"url":"https://api.github.com/repos/mindeavor/es-pipeline-operator/issues/comments/165550923","html_url":"https://github.com/mindeavor/es-pipeline-operator/issues/21#issuecomment-165550923","issue_url":"https://api.github.com/repos/mindeavor/es-pipeline-operator/issues/21","id":165550923,"user":{"login":"RangerMauve","id":911495,"avatar_url":"https://avatars.githubusercontent.com/u/911495?v=3","gravatar_id":"","url":"https://api.github.com/users/RangerMauve","html_url":"https://github.com/RangerMauve","followers_url":"https://api.github.com/users/RangerMauve/followers","following_url":"https://api.github.com/users/RangerMauve/following{/other_user}","gists_url":"https://api.github.com/users/RangerMauve/gists{/gist_id}","starred_url":"https://api.github.com/users/RangerMauve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RangerMauve/subscriptions","organizations_url":"https://api.github.com/users/RangerMauve/orgs","repos_url":"https://api.github.com/users/RangerMauve/repos","events_url":"https://api.github.com/users/RangerMauve/events{/privacy}","received_events_url":"https://api.github.com/users/RangerMauve/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T19:07:51Z","updated_at":"2015-12-17T19:07:51Z","body":"I see where you're coming from, but I don't think it makes sense unless it was always equivalent to `R.pipeP(f,g)(x)`. It seems like currently the pipeline operator is more equivalent to `R.pipe(f,g)(x)`. Magically choosing between on or the other based on whether promises are detected somewhere in the chain doesn't seem like an intuitive way to go. It might make sense to wait until the non-promise version of the pipeline operator gets accepted, and then propose an async pipeline operator which deals with promises by default"}}