{"action":"closed","issue":{"url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/96","repository_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator","labels_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/96/comments","events_url":"https://api.github.com/repos/tc39/proposal-pipeline-operator/issues/96/events","html_url":"https://github.com/tc39/proposal-pipeline-operator/issues/96","id":297299818,"node_id":"MDU6SXNzdWUyOTcyOTk4MTg=","number":96,"title":"Allow pointfree pipelines","user":{"login":"masaeedu","id":3674056,"node_id":"MDQ6VXNlcjM2NzQwNTY=","avatar_url":"https://avatars1.githubusercontent.com/u/3674056?v=4","gravatar_id":"","url":"https://api.github.com/users/masaeedu","html_url":"https://github.com/masaeedu","followers_url":"https://api.github.com/users/masaeedu/followers","following_url":"https://api.github.com/users/masaeedu/following{/other_user}","gists_url":"https://api.github.com/users/masaeedu/gists{/gist_id}","starred_url":"https://api.github.com/users/masaeedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masaeedu/subscriptions","organizations_url":"https://api.github.com/users/masaeedu/orgs","repos_url":"https://api.github.com/users/masaeedu/repos","events_url":"https://api.github.com/users/masaeedu/events{/privacy}","received_events_url":"https://api.github.com/users/masaeedu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":38,"created_at":"2018-02-15T01:04:57Z","updated_at":"2018-10-08T18:54:15Z","closed_at":"2018-10-08T18:54:15Z","author_association":"NONE","body":"I have the following definition:\r\n\r\n```\r\nconst capitalizeKeys = o =>\r\n  o |> pairs |> map(([k, v]) => [toUpper(k), v]) |> fromPairs;\r\n```\r\n\r\nWhich is basically equivalent to `o => fromPairs(map(...)(pairs(o)))`. The `o => o |> ...` abstraction seems kind of unnecessary, since it is in a position where it can basically be omitted. \r\n\r\n___\r\n\r\nWith something like the `pipe` primitive from an FP library I can do:\r\n\r\n```\r\nconst capitalizeKeys = pipe([pairs, map(...), fromPairs])\r\n```\r\n\r\nor with a hypothetical `.` composition operator I would be able to do:\r\n\r\n```\r\nconst capitalizeKeys = fromPairs . map(...) . pairs\r\n```\r\n\r\nNeither of these require me to explicitly introduce a new function with an `o` parameter.\r\n\r\n___\r\n\r\nIt would be nice if the `|>` syntax allowed me to do something like:\r\n\r\n```\r\nconst capitalizeKeys = |> pairs |> map(...) |> fromPairs\r\n\r\n// or maybe some kind of interaction with https://github.com/tc39/proposal-partial-application\r\nconst capitalizeKeys = ? |> pairs |> map(...) |> fromPairs\r\n```\r\n\r\nI'm not hung up on the syntax, I just want to be able to compose sequences of functions without having to introduce wrapping functions where not necessary."}}
{"actor":{"display_login":"masaeedu"}}